javascript - How to animate div for a fixed (offset) position using jQuery? -


i have simple div move (animate) known position on screen ("fixed"). have found animate() method in jquery moves element in given pixels not i'm looking for. example:

div's name "framearea" , move offset top: 5px / left: 260px. if write following, move div 5px down , 260px right. doing wrong? possible?

 $("#framearea")        .animate({            left: 260px,            top: 5px         }, 5000); 

i'm new html , jquery, please gentle :)

thanks!

try example. make sure u start animation after element loaded. may in document.ready

example


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -