How to attach mouse move event to an element ?

 Posted by Vivek.Ramapuram on 11/7/2014 | Category: jQuery Interview questions | Views: 2453 | Points: 40

mousemove() method is used in jquery to write mouse move elelment in the html.
<script type="text/javascript"> 

$("#spanMouseDownUp").mousemove(function () {
$(this).html("You have started moving");
<div id="spanMouseDownUp" style="background:green;color:White;padding:10px;">Try to bring your mouse here</div>

In the code when user move mouse over “spanMouseDownUp” element then “You have started moving” text will be written inside it.

Asked In: spotted while learning | Alert Moderator 

Comments or Responses

Login to post response