javascript - Why does Animate marginLeft does not work? -
i'm building slider animating marginleft not work , can't figure out why.
a fade opacity doesn't work also.
$currentslide.find('.content').animate({ marginleft: '-100%', opacity: 0 }, speed); settimeout(function() { $currentslide.removeclass('active'); $nextslide.addclass('active'); $nextslide.find('.content').animate({ marginleft: '0%', opacity: 1 }, speed); }, speed);
here can see 2 slides ( $currentslide , $nextslide ) first slide should fade out animating marginleft -100% , second slide sould vice versa.
[edit] sliding click on white bars
example: https://codepen.io/anon/pen/dpnrqq
[edit]: example me doesn't should work!
failure found:
change
$currentslide.find('.content').animate
to
$currentslide.find('.slide-content').animate
Comments
Post a Comment