How to disable link?

Pretty much the title.


squiffy.ui.output.on('click', function() {
disableLink("#theIdOfYourLink");
});
would be one way to do it. You might have to remove the "#" and just write "theIdOfYourLink" instead, haven't tried. Usually Squiffy handles link disabling, so you wouldn't need to do this.

Please note that Squiffy DOES NOT properly disable the link, it just changes the colour of the link and sets its tabindex to "-1", which means it's focusable by script but not by the user's keyboard. For better handling of this you'd have to additionally call
$("#theIdOfYourLink").prop("disabled", "disabled");


Log in to post a reply.

Support

Forums