Skip to content Skip to sidebar Skip to footer

Pointer Event Disable Anchor Tag

I have to disable the link on an li but it should not be disabled all events just disable the link and it will be clickable so i can use hide and show menu function on it #menu-it

Solution 1:

To disable a link just do

$('#menu-item-747 a').click(function(e){
     e.preventDefault();
});

This won't prevent other actions, just the default one of the link element (i.e. following the link).

Post a Comment for "Pointer Event Disable Anchor Tag"