May 08, 2012

Smooth scroll and find position of scrollbar with jQuery plugin

As a Html designer we all know that we can navigate to a position within a page using Anchor Point
[cc lang="html"]
//set a position
This is a position
// button for me to go to that position

however many designers are building more sexy and easy ways using javascript libraries, one of the easiest way i found that allow me to allow the scrolling smoothly is a plugin, download below
[button link="" size="medium" target="blank"]anchor plugin[/button]      [button link="" size="medium" target="blank"]jQuery[/button]

Its very easy to use, all you need to do is call this plugin to header

[cc lang="html"]

then you are done. as easy as that. of of remember to do your normal HTML anchor element, like what I did on top.

Now i want to find the position of my scrollbar so i can do something to it, lets say if my position of scrollbar is at 480px, then hide a div. Jquery provide a easy Method by using scrollTop()
below is a snippet of how i did it.