Sliding menu using jQuery and ScrollTo

jquery-logo

Recently I created a sliding menu for a project using jQuery and ScrollTo functions.

See demo: Slider  Menu

We can use the jQuery function $(“.menubar”).scrollTo(id_of_element) to scroll any scrollable area to a particular location.

The idea behind every smooth sliding is using scroll function with overflow:hidden mode.

You can download the source code from : http://www.sajithmr.me/downloads/slider/slider.zip

Here div menu-bar is the scrollable div with overflow:hidden mode contains set of menu and a duplicate as a  buffer

At the bottom of the code, you can see a filler div, this is for filling the menu one by one to the right side menu-bar to make the sliding very smooth

The function setMotion(this) calls  the scroll function and it moves till the called DOM object’s id reaches

If you use an ajax call after the motion to load the content at the bottom, you can make this sliding menu for proper navigation purpose.

Thanks

Sajith

1 Comments , , , , , , ,

One Response to “Sliding menu using jQuery and ScrollTo”

  1. oyun online May 14, 2010 at 3:12 am #

    I learned it was good, thanks

Leave a Reply

More in Downloads, html (8 of 53 articles)


Flash messages or notification messages are very essential part of every update/edit or delete operations. We either use ajax update ...