so i've been looking plugin or jquery code drop site i'm working on allows easy image switches onhover. found awesome little tool: http://www.designchemical.com/blog/index.php/jquery/quick-and-easy-jquery-image-swap/ ... need except switches image not crossfade onhover. know can create image onhover change background fade in image (i.e. css sprites) have yet find plugin easy link above can drop in class on buttons on site default of "_off.jpg" @ end of image , have jquery change out "_off.jpg" "_on.jpg". unfortunately site i'm working on has lot of buttons , having meticulously create hover situation background change time consuming.
anyone got recommendations on jquery and/or plugins they've found life?
thanks!
if want quick fade effect can animate opacity. doesnt give cross-over fade though
$(".img-swap").hover( function(){ this.src = this.src.replace("_off","_on"); $(this).css({opacity: 0}).animate({opacity: 1},{ queue: false, duration: 'slow' }); }, function(){ this.src = this.src.replace("_on","_off"); $(this).css({opacity: 0}).animate({opacity: 1},{ queue: false, duration: 'slow' }); });
see demo - http://www.designchemical.com/lab/jquery/demo/jquery_demo_image_swap_fade.htm
Comments
Post a Comment