I am trying to set a box A to jump to the same x-position as box B. How do I do this? I tried the following but it does not work (the second line):
$("#boxa").animate({
left: $("#boxb").left
}, 1000, function() { });
});
Thanks,
Sam
either
$('#boxB').css('left');
or
$('#boxB').offset().left;
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