Javascript examples for jQuery Method and Property:on
Reference a website loaded with JQuery
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script> <script type="text/javascript"> window.onload=function(){/*from ww w . ja va 2 s .c o m*/ $(document).on( "click", ".myDiv", function() { console.log("hello"); }); } </script> </head> <body> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <a class="myDiv">click</a> </body> </html>