Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

disable anchor tag jquery after click

$('.btn').on('click', function(e) {
    e.preventDefault();
    $(this).off("click").attr('href', "javascript: void(0);");
   //add .off() if you don't want to trigger any event associated with this link
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #disable #anchor #tag #jquery #click
ADD COMMENT
Topic
Name
9+6 =