Answers for "how to disable anchor onclick using jquery"

0

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
});
Posted by: Guest on July-15-2020

Code answers related to "how to disable anchor onclick using jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language