177
rated 0 times
[
178]
[
1]
/ answers: 1 / hits: 34513
/ 13 Years ago, fri, february 17, 2012, 12:00:00
Is there a way in javascript/jQuery to take two variables with values 60px and 40px and add them together to get 100px?
Or in a more general sense, I'm trying to calculate positions of objects relative to other objects and it would be really convenient if I could do something like this:
$('#object2').css('left', $('#object1').css('left')+'60px');
Of course, that just gives in invalid 40px60px.
More From » jquery