jquery - Animate addClass + removeClass transitions? -


say have 2 boxes, 1 positioned in top left hand corner of screen using class:

.position1 {     position: fixed;     top: 100px;     left: 100px; } 

and positioned in bottom right using class:

.position2 {     position: fixed;     bottom: 100px;     right: 100px; } 

is there simple way, using jquery or otherwise, to:

  • slide (animate) box in upper left position of bottom right one
  • slide (animate) box in bottom right position of top left one

i can achieve without using animation simple doing .addclass() , .removeclass()... need animations imitate boxes "switching places" each other rather instantaneously swapping sides.

i've looked @ jquery animate feature doesn't appear, unless i'm mistaken, can apply pre-defined class (and remove pre-defined class) option of animate function.

look here: jquery.animate() css class only, without explicit styles or here: http://api.jqueryui.com/switchclass/


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -