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
Go

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=”http://www.position-absolute.com/articles/better-html-anchor-a-jquery-script-to-slide-the-scrollbar/” size=”medium” target=”blank”]anchor plugin[/button]      [button link=”http://docs.jquery.com/Downloading_jQuery” 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.

$(document).ready(function(){
$(window).scroll(function (){
var $scrollP = $(window).scrollTop();
if($scrollP > 600){
$('div').slideDown(800);
} else {
$('div').slideUp(800);
}
})

});