I have a menu with multiple links (a HTML tags).
Clicking a menu entry add the 'active' class which change the menu entry look & feeling.
The menu entries has the data-remove="true"
in order to Ajaxify the link.
What I want to do is to prevent calling the server when the user click 2 times the same link.
My idea was to say if the menu entry has the 'active' class, then prevent the call to the server otherwise let it go.
I gave some tries to preventDefault
, stopPropagation
, and return false
... but it's not working as expected.
The best I got was when combining both preventDefault
and stopPropagation
but then the controller were never call anymore.
How can do to avoid calling the controller when clicking a link having the 'active' CSS class ?