jQuery event with live() - Javascript jQuery Method and Property

Javascript examples for jQuery Method and Property:live

Description

jQuery event with live()

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-1.6.2.js"></script> 
  <script type="text/javascript">
    $(window).load(function(){//  w w  w  . ja  v a 2 s. c  om
$("div:not(div#winner)").live('click', function(e) {
    console.log("Test");
});
    });

      </script> 
 </head> 
 <body> 
  <div id="PageContent">
    Content 
  </div> 
  <div id="winner">
    asdfasdf
  </div>  
 </body>
</html>

Related Tutorials