JQuery Animate (increasing width of img) smoothing -


so trying create slow zooming in , out effect banner image

the effect works, animation very choppy. there anyway improve effect smoother? img 1000px default, 30% increase in size zoomin function. @ 50000ms smooth, desired effect (not distracting viewer of page content) want 100000-200000ms.

thanks can provide!

  $bannerimg = $('img');    function zoomin(){     $bannerimg.animate({       width: '+=300',       }, 100000,'linear');     $bannerimg.promise().done(zoomout);   }    function zoomout(){     $bannerimg.animate({       width: '-=300',       }, 100000,'linear');     $bannerimg.promise().done(zoomin);   }    zoomin(); 

you can add easing js animation , make animate quite bit smoother. check out example here: jquery easing


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -