<html> <head> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("div").mouseup(function(){ $(this).append('<span style="color:#F00;">Mouse up.</span>'); }).mousedown(function(){ $(this).append('<span style="color:#00F;">Mouse down.</span>'); }); }); </script> </head> <body> <body> <div>adsf</div> </body> </html>