amiawizard amiawizard - 6 months ago 11
Javascript Question

Easiest way to slide to position (position absolute)

What is the easiest way to slide an element up and down which has an absolute position? I was thinking of using a transform transition with translate unless there's an easier way to add sliding transitions to position changes.

Answer

CSS transition would be the easiest way I think (no files to add)

Or you can use jquery with .animate like this :

.('#yourId').animate({top:200},500);