Javascript examples for jQuery:Mouse Event
JQuery display onclick on element's child
<html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> </head> //from ww w . java2 s . c o m <body> <div id="resultsBox"> <ul> <li>Element 1</li> <li>Element 2</li> </ul> </div> <script> $("#resultsBox li").click(function(){ console.log("You clicked on li " + $(this).text()); }); </script> </body> </html>