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

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -