View Single Post
Old 03-08-2013, 07:42 PM   PM User | #1
turpentyne
Regular Coder

 
Join Date: Aug 2010
Posts: 309
Thanks: 10
Thanked 1 Time in 1 Post
turpentyne is an unknown quantity at this point
mouseover/out issue

I've added in a .filter to get rid of queued up mouseovers on an div, but now, if the user mouses out quickly enough, the image continues to get +10 larger without ever shrinking back down, like the mouseout says to. The problem is that there's a separate animation that makes the images a different size, so I'm trying to do this with a relative size with +=, -= and not set pixels.

any thoughts?

Code:
$(".square.one,#link_nest").mouseenter(function(){
 
	if ($(".the-nest")[0]){
		$("#link_nest").css({color:"#153d53",fontWeight:"400"},100);
		}
	else{
	
		$(".square.one").filter(':not(:animated)').animate({width:"+=10px"},200);
		$("#link_nest").css({color:"#153d53",fontWeight:"400"},100);
		$("#square_caption1").css('visibility','visible');
	} 
 });
  
  
 $(".square.one,#link_nest").mouseleave(function(){
	if ($(".the-nest")[0]){
		$("#link_nest").css({color:"black",fontFamily: "Source Sans Pro",fontWeight:"300"},100);
	}
	else{
    	$(".square.one").filter(':not(:animated)').animate({width:"-=10px"},200);
    	
    	$("#link_nest").css({color:"black",fontFamily: "Source Sans Pro",fontWeight:"300"},100);
    	$("#square_caption1").css('visibility','hidden');
    }

 });

Last edited by turpentyne; 03-08-2013 at 07:55 PM..
turpentyne is offline   Reply With Quote