1
I’m having a hard time blocking simultaneous clicks on menu items in my application, when the user first clicks I want to block attempts at new clicks, I want to do this because there is a user clicking a 100 times menu item that takes about 15 seconds to load and is overloading the system.
Here’s an example of the html code and javascript 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>
You need to disable simultaneous clicks on just one link or all elements
<a>
of your page?– wmarquardt
This @Williammarquardt
– Zica