Javascript examples for jQuery Selector:class
Add Class in jQuery and Select the added New Class
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.6.2.js"></script> <script type="text/javascript"> $(function(){// ww w. jav a 2 s. com $(".theLink").live("click", function(){ $(this).addClass("live"); return false; }); $(".live").live("click", function(){ console.log("YO!"); return false; }); }); </script> </head> <body> <a href="#" class="theLink">Click here</a> </body> </html>