Change link with jQuery depending on class - Javascript jQuery

Javascript examples for jQuery:Link

Description

Change link with jQuery depending on class

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript" src="https://code.jquery.com/jquery-2.0.2.js"></script> 
      <script type="text/javascript">
    $(window).load(function(){//from   w ww  .j  a v a 2 s. c o  m
 $("#btn").click(function () {
            $(this).addClass("saved");
            $(this).html("Remove This");
        });
    });

      </script> 
   </head> 
   <body> 
      <a id="btn" href="#" class="">Save This</a>  
   </body>
</html>

Related Tutorials