How to remove clickable behavior from a disabled link using jQuery ? Last Updated : 31 May, 2023 Comments Improve Suggest changes Like Article Like Report In this article, we will see how to remove the clickable behavior from a disabled link using jQuery. To remove the clickable behavior, we will use the removeAttr() method. The removeAttr() method is used to remove one or more attributes from the selected elements. Syntax: $(selector).removeAttr(attribute) Parameters: This method accepts a single parameter attribute that is mandatory. It is used to specify one or more attributes to remove. Several attributes can be separated using the space operator. In this article, we will remove the href attribute using the removeAttr() method. Example: In this example, we will see the use of the removeAttr() method. HTML <!DOCTYpe html> <html> <head> <title> How to remove clickable behavior from a disabled link using jQuery? </title> <script src= "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"> </script> <script> $(document).ready(function () { $("body").css("text-align", "center"); $("h1").css("color", "green"); $("a").css({ fontSize: "34px", fontWeight: "bold", color: "green", textDecoration: "none" }) $("a").each(function () { if ($(this).hasClass("disabled")) { $(this).removeAttr("href"); } }); }); </script> </head> <body> <a href="https://www.geeksforgeeks.org/" class="disabled"> GeeksforGeeks </a> <h3> How to remove the clickable behavior from <br>a disabled link using jQuery? </h3> </body> </html> Output: Comment More infoAdvertise with us Next Article How to remove clickable behavior from a disabled link using jQuery ? V vkash8574 Follow Improve Article Tags : Web Technologies JQuery HTML-Tags CSS-Properties jQuery-Methods HTML-Questions CSS-Questions jQuery-Questions +4 More Similar Reads How to make a Disabled Checkbox using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a Disabled Checkbox using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ 1 min read How to disable right-click option using the jQuery ? The bind() method in jQuery is used to attach one or more event handlers for selected element and this method specifies a function to run when an event occurs. Syntax: $(selector).bind(event, data, function);Parameters: This method accepts three parameters as mentioned above and described below: eve 2 min read How to make a Disable Buttons using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be making a Disable Button using jQuery Mobile. Approach: First, add jQuery Mobile scripts needed for your project. <link rel="stylesheet 1 min read How to create a Disabled Input using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be creating a Disabled Input using jQuery Mobile. Approach: Add jQuery Mobile scripts needed for your project. <link rel=âstylesheetâ hre 1 min read How to enable/disable a button using jQuery ? Enabling/disabling a button using jQuery involves altering its functionality to either accept user input or not. This is typically done by manipulating its 'disabled' property or attribute through jQuery methods like `.prop()` or .attr().To enable/disable a button using jQuery, you'll need a basic H 2 min read Like