jQuery Plugin To Create A Fixed Side Menu - callToScroll

File Size: 16.5 KB
Views Total: 8079
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
jQuery Plugin To Create A Fixed Side Menu - callToScroll

callToScroll is a jQuery plugin to create a fixed side menu which allows the visitor to navigate between your single page website quickly and smoothly.

How to use it:

1. Load jQuery JavaScript library and other required resources in your web page.

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="isInViewport.min.js" type="text/javascript"></script>
<script src="setLocationHash.js" type="text/javascript"></script>

2. Load the jQuery callToScroll plugin's stylesheet and JavaScript in the web page.

<link href="callToScroll.css" rel="stylesheet">
<script src="callToScroll.js"></script>

3. Add the CSS class 'cts-item' to your content sections.

<h2 class="cts-item">Section 1</h2>

...

<h2 class="cts-item">Section 2</h2>

...

<h2 class="cts-item">Section 3</h2>

...

4. Call the plugin to initialize the side menu with default options.

$('h2').ctscroll();

5. Default options available.

$('h2').ctscroll({

// blue, white or orange
'theme': 'orange',

// Text between arrows
'text': 'Scroll down',

// if target element dont have id parameter, 
// this text and element index is used to set it
'autoIdText': 'myIdText',

// scroll Duration in ms
'scrollDuration': 450,

// positive or negative
'scrollOffset': 5,

// if true, library setLocationHash can be removed
'html5Hash': false

});

Change log:

2015-10-14

  • added gruntfile, switched to SVG elements, changed project tree
  • bugfix

2015-02-11

  • bugfix

This awesome jQuery plugin is developed by tvaliasek. For more Advanced Usages, please check the demo page or visit the official website.