javascript - how to check whether a button is on hover -
is there javascript property check whether button on hover. need because when mouse hovered on button perform particular task.
i can see event onmouseover no property check whether mouse hovered or not.
can 1 please me out on how can proceed this.
try (jquery). it's messy idea:
<input type="text" value="test"><input type="button" value="test"> <div id="div">-</div>
with:
$(function(){ $('*') .data('hovering', false) .mouseover(function(){$(this).data('hovering', true)}) .mouseout(function(){$(this).data('hovering', false)}); }); window.setinterval(function() { $('#div').html("textbox hovered: " + $('input[type="text"]').data('hovering')); }, 100)
Comments
Post a Comment