How can I use jQuery to move an element from:
position: absolute;
left: 169px;
top: 182px;
to:
position: absolute;
left: 169px;
top: 230px;
with clear moving so not just css, it has to be moving.
Thanks.
Answer: Use the jQuery . appendTo() Method You can use the jQuery . appendTo() method to move an element into another element.
You can use the CSS position property in combination with the z-index property to overlay an individual div over another div element. The z-index property determines the stacking order for positioned elements (i.e. elements whose position value is one of absolute , fixed , or relative ).
In plain JavaScript, you can use the appendChild() method to move the existing source element in the document to the target element.
http://api.jquery.com/animate/
Demo: http://jsfiddle.net/pHwMK/
JS:
$(function() {
$("div.ele").animate({ top: '230px' });
});
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