Hi I need to scale and animate div left same time.
Something like this.
$('#div').effect('scale'{percent:200},
'animate',{left:200});
Thanks.
This is the solution I found.
$('#div').effect('scale'{percent:200},1000);
$('#div').animate({left:100,top:100},1000);
$('#div').fadeTo(1100,0));
animate() , which is, in fact, very slow. However, JavaScript animation libraries that bypass jQuery deliver incredible performance by avoiding DOM manipulation as much as possible. These libraries can be up to 20 times faster than jQuery.
The jQuery animate() method is used to create custom animations. Syntax: $(selector). animate({params},speed,callback);
The jQuery animate() method provides you a way to create custom animations. Syntax: $(selector). animate({params}, speed, callback);
The animate() method performs a custom animation of a set of CSS properties. This method changes an element from one state to another with CSS styles. The CSS property value is changed gradually, to create an animated effect. Only numeric values can be animated (like "margin:30px").
$('#div').animate({
left: 200,
height: ($(this).height()*2),
width: ($(this).width()*2)
}, 1000);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With