Scroll To Top Using jQuery

It's only fair to share...Share on Facebook0Share on Google+0Tweet about this on Twitter0Share on LinkedIn0Pin on Pinterest0Digg thisShare on StumbleUpon0

scroll to top

There are lots of websites having scroll to top feature so that their visitors can easily move to top of website by one click. If you have long length page then your website must have scroll to top feature.  It is very simple to do with jQuery (just a few lines of code). Using jQuery, It checks if the scrollbar top position is greater than defined value, then scroll to top button appears. Its very easy to create and implement.

The main part of jQuery for scroll to top:

In html part you need to have ‘cd-top’ class:

In CSS you have add following line:


Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">