Smooth One Page Scroll Plugin For jQuery - SONP
File Size: | 4.27 KB |
---|---|
Views Total: | 1082 |
Last Update: | |
Publish Date: | |
Official Website: | Go to website |
License: | MIT |
SONP is a lightweight jQuery plugin which provides the smooth scroll & parallax scroll experiences to your one page website or single page web applications.
How to use it:
1. Add the CSS class 'no-scroll' to body
tag that will remove the default browser scrollbar.
<body class="no-scroll">
2. Add the CSS class 'sonp-section sonp-full' to content sections that will create fullscreen pages.
<div class="sonp-section sonp-full" id="first"> ... </div>
3. Add the CSS class 'sonp-parallax' to content sections if you want to apply the parallax effect.
<div class="sonp-section sonp-full sonp-parallax" id="two"> ... </div>
4. Add the CSS class 'sonp-small' and 'sonp-middle' to content sections if you prefer small page sections.
<div class="sonp-section sonp-middle" id="three"> ... </div> <div class="sonp-section sonp-small" id="last"> ... </div>
5. Add the jQuery SONP's script after jQuery library like this:
<script src="jquery.min.js"></script> <script src="sonpScroll.js"></script>
6. That's it. You can create custom buttons which allows the visitor to navigate between pages manually.
<a onclick="$('.sonp-section').nextPage()">Next Page</a> <a onclick="$('.sonp-section').prevPage()">Prev Page</a>
This awesome jQuery plugin is developed by talesluna. For more Advanced Usages, please check the demo page or visit the official website.