Show texts when mouseup and mousedown event triggering. : Event Mouse « jQuery « JavaScript DHTML
- JavaScript DHTML
- jQuery
- Event Mouse
Show texts when mouseup and mousedown event triggering.
<html>
<head>
<script type="text/javascript" src="js/jquery-1.3.2.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("p").mouseup(function(){
$(this).append('<span style="color:#F00;">Mouse up.</span>');
}).mousedown(function(){
$(this).append('<span style="color:#00F;">Mouse down.</span>');
});
});
</script>
<style>
div.dbl { background:yellow;color:black; }
</style>
</head>
<body>
<body>
<p>Press mouse and release here.</p>
</body>
</html>
Related examples in the same category