Anyone know how to disable a link in jquery WITHOUT using return false;?
Specifically, what I\'m trying to do is disable the link of an item, performing
My fav in "checkout to edit an item and prevent -wild wild west clicks to anywhere- while in a checkout" functions
$('a').click(function(e) {
var = $(this).attr('disabled');
if (var === 'disabled') {
e.preventDefault();
}
});
So if i want that all external links in a second action toolbar should be disabled while in the "edit-mode" as described above, i'll add in the edit function
$('#actionToolbar .external').attr('disabled', true);
Link example after fire:
Google
And now you CAN use disabled property for links
Cheers!