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.