javascript - does a click also trigger a mouseout in chrome -


i'm testing ratings module i'm working on, had idea simple construction that'd allow smooth ajax based voting, found odd..

the contruction 2 divs, 1 nested in other show stars, mousing on sets width, translated percent vote later on.

in testing this, found worked, when clicked, made width of inner div reset, if moused out, i'm not sure understand why yet. i'm including working example of this.

http://www.nogumallowed.com/test.php

here fixed code:

$(".ratingsblock").mousemove(function(e){     $(".ratingsscale").width(e.offsetx); });  $(".ratingsblock").click(function(e){     $(this).attr("score",e.offsetx);  });  $(".ratingsblock").mouseleave(function(e){     $(".ratingsscale").width($(this).attr('score'));     //$(".ratingsscale").animate({width:$(this).attr('score')+'px'}, 500); }); 

i changed mouseout function mouseleave, , made rating's score update when .ratingsblock clicked.

mouseout weird sometimes...


Comments

Popular posts from this blog

pentaho - Carte Status / Kettle Slave Server Status page shows status for random runs instead of the latest run -

R summary function in ddply (plyr) in a simple way -

c# - Are delegates created via lambda expressions guaranteed to be cached? -