I've got a dynamically created HTML element. It has some CSS and HTML:
<div id="element"></div>
#element{
height: 200px;
width: 200px;
background-color: blue;
}
#element:hover{
cursor: pointer;
}
and it is then removed from the page programmatically while the mouse is still over the element.
$('#element').hover(function(){
setTimeout(function(){
$(this).remove();
}.bind(this), 1000);
});
This leaves the cursor looking like a pointer until the mouse moves. Is there any way to fix that while still using CSS hover?
Here's a fiddle: http://jsfiddle.net/mHdtU/
EDIT: This is in the latest Google Chrome. Also, apparently HIDING the element causes the cursor to update. Is the fact that the cursor not updating on remove a bug in Google Chrome?
$('#element').hover(function(){
setTimeout(function(){
$(this).hide();
setTimeout($(this).remove.bind(this));
}.bind(this), 1000);
});