How to move an element in javascript
I know Javascript at an beginner level and I need help.
left = '-180px';
$sub_menu.show().animate({'left' : left}, 200);
I want to move $ sub_menu from the right side to 180px
from its default position before animating it, i.e. indent to the right.
!!! EDIT !!!
For each menu item, in the center of the mouse, I zoom in and show both the sdt_active
span and sdt_wrap
span. If the element has sub menu
( sdt_box
), then I slide it - if the element is the last in the menu, I slide it to the left, otherwise to the right. My problem is the last Menu 6 . It should work like other menus, only it should slide to the left at the same width.
source to share
check http://api.jquery.com/animate/
and you should use this in your example
$sub_menu.show().animate({ 'left' : '-180px' }, 200);
source to share