I'm having trouble blocking simultaneous clicks on menu items in my application, when the user clicks the first time I want them to block attempts at new clicks, I want to do this because I have a user clicking a 100 times menu item which takes about 15 seconds to load and is overloading the system.
Here is an example of the html code and javascript that I'm trying to use for blocking.
$(document).ready(function () {
$('a').on('click', function () {
$(this).attr('disabled', true);
$(this).addClass("disabled");
$(this).prop("onclick", null).off('click');;
});
});
<ul class="dropdown-menu">
<li>@Html.ActionLink("Teste", "Index", "Teste")</li>
</ul>