Wednesday, June 30, 2010

jQuery $('#mydiv').css('top','500'); not working

Programmer Question

Hello, I have this:






With:



#mydiv{ position:relative; }


When I execute:



$('#mydiv').css('top','500');


Is not working, I'm not getting errors at all.



Basically what I need to do is move (not animate) that DIV 500px up, is there any other way to do it?



Find the answer here

1 comment:

  1. If you're moving it up, you need:

    $('#mydiv').css('top','-500px'); (I think)

    ReplyDelete

LinkWithin

Related Posts with Thumbnails