Handle document click event - Javascript jQuery

Javascript examples for jQuery:Document

Description

Handle document click event

Demo Code

ResultView the demo in separate window

<html>
   <head></head>
   <body> 
      <p class="fg">grjvtrjv</p>  
      <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> 
      <script>
      $(document).on("click",".fg",function(){
         $(this).html("sdfds");
      });/*from  w  w  w  .  ja v  a  2s .  co  m*/
   
      </script> 
   </body>
</html>

Related Tutorials