[jquery snippets] #jquery
$('p').animate({
left: '+=90px',
top: '+=150px',
opacity: 0.25
}, 900, 'linear', function() {
// function code on animation complete
});
/*
<div id="clickme">Click here</div>
<img id="book" src="book.png" alt="" width="100" height="123" style="position: relative; left: 10px;">
$( "#clickme" ).click(function() {
$( "#book" ).animate({
opacity: 0.25,
left: "+=50",
height: "toggle"
}, 5000, function() {
// Animation complete.
});
});
*/
// source: http://api.jquery.com/animate/