Friday, November 29, 2013

Enable/ Disable Link Using jQuery


Consider a link by the id, 'link1'.
<a href="abc.htm" id="link1">

It can be disabled using jquery .
$("#link1").css({'pointer-events':'none', 'cursor':'default'});

Disabled link can be enabled by removing the css properties. 
$("#link1").css({'pointer-events':'', 'cursor':''});

thanks,
Shyarmal

No comments:

Post a Comment