Answer: mousedown() method can be used for mouse down event to a html element,.
Example :
<script type="text/javascript">
$("#spanMouseDownUp").mousedown(function () {
$(this).html("Mouse down");
});
</script>
<div id="spanMouseDownUp" style="background:green;
color:White;padding:10px;">Try to click here</div>
In mouse event method () when user start clicking mouse on the “spanMouserDownUp” element “Mouser clicked” will be written inside it.
Asked In: spotted while learning |
Alert Moderator