7
On my startup I know that all links should block, using the plugin jquery-blockui, the screen to avoid multiple clicks of impatient user avoiding multiple and unnecessary server requests.
$("a").on("click", $.blockUI);
I had a problem I reported in the question Different multiple select rendering for each browser and I ended up accepting as answer and the only answer given and using the solution given in the first option of the update of this same answer, but this widget uses links to mark all options, uncheck all options or close it and this triggers my event above. I tried to use to stop the event the code below:
$("a.ui-multiselect-none, a.ui-multiselect-all, a.ui-multiselect-close").on("click", function(e) {
e.preventDefault();
});
That is, I tried to stop the default link action in the links with the classes used by the widget, but this did not work. What actually worked was what I used below:
$("a.ui-multiselect-none, a.ui-multiselect-all, a.ui-multiselect-close").on("click", $.unblockUI);
But this solution gives an effect on the screen as if it had flashed. Is there any way to make these links simply do not trigger blockUI differently than others being a system UX exception?
Have you tried
e.preventDefault()
and then areturn(false)
?– Paulo Roberto Rosa
Have you seen this question and the solution
pointer-events: none;
?: http://answall.com/questions/2352/como-impedir-um-click-sobre-um-link-ancora-ou-elemento-com-evento-amarrado/2353#2353– Sergio
Sergio, the approved browser is IE 8. Plus I wouldn’t be able to add these classes to the widget.
– Philippe Gioseffi
@Pauloroberto, your alternative didn’t work either, but thanks for the help.
– Philippe Gioseffi
@Zuul already got the solution and posted here, thanks for your time.
– Philippe Gioseffi