0

How do we animate an object with an amount that I deduced with some calculations?

$(document).ready(function(){
    var someNumber = "'+='" + 500 + "'";
    $('.someClass').animate(
        {left:someNumber},
        {duration : 500, queue : false},
        function(){
        });
});

Here's the fiddle:
http://jsfiddle.net/H7hpP/

Why is the element not animating?
P.S If I have to apply the same animation to two objects, is the following valid? I remember seeing it somewhere:

$('#firstPage #secondPage').animate(
{css property}, 
{duration},
function(){});

Beginners question, but that's what my experience with jQuery is.

4

2 に答える 2

0

チェックしてくださいjsfiddle.net/vinhnguyenle/H7hpP/8/

于 2013-06-29T03:28:02.783 に答える