Anyone know how to disable a link in jquery WITHOUT using return false;?
return false;
Specifically, what I\'m trying to do is disable the link of an item, performing
Try this:
$("a").removeAttr('href');
EDIT-
From your updated code:
var location= $('#link1').attr("href"); $("#link1").removeAttr('href'); $('ul').addClass('expanded'); $('ul.expanded').fadeIn(300); $("#link1").attr("href", location);