Prova con questo
Codice PHP:
<script type="text/javascript">
function move_box(elem) {
elem.animate({"marginTop": "-=10px"}, 500)
.animate({"marginTop": ""}, 500, function() { move_box($(this)) });
}
$(document).ready(function() {
$("#triggers a").each(function() {
move_box($(this)); //Start animation on each
});
$('#triggers a').hover(function() {
//Stop this element's animation
$(this).stop().toggleClass('active').children("div").show();
}, function() {
$(this).removeClass('active');
$(".feature-box").fadeOut();
move_box($(this)); //Resume animation only on this.
});
});
</script>