siliconsenthil

Onclick link disabling with jQuery

Days back I have come across a common requirement to disable link on clicking it once. Typically, it’s because on click of those links some AJAX thins happen and some fragments of the page gets updated.

I had those sort of links across screens and I have written Javascript using jQuery as ‘Unobtrusive Javascript’. All I gotta do is to add a class called ’link_to_disable’ to the links I wanted to disable.