Mouse aware Element Scroller Plugin jQuery Infinite Scroller - Download Mouse-aware Element Scroller Plugin With jQuery - Infinite Scroller

Download Mouse-aware Element Scroller Plugin With jQuery – Infinite Scroller

Posted on

This time I will share jQuery Plugin and tutorial about Mouse-aware Element Scroller Plugin With jQuery – Infinite Scroller, hope it will help you in programming stack.

Mouse aware Element Scroller Plugin jQuery Infinite Scroller - Download Mouse-aware Element Scroller Plugin With jQuery - Infinite Scroller
File Size: 14.2 KB
Views Total: 3321
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

An infinite, mouse-aware jQuery scroller plugin which has the ability to automatically scroll a list of position: absolute html elements left or right depending on the mouse position.

How to use it:

1. Include the stylesheet infinite-scroller.css in the header, and the JavaScript infinite-scroller.js after jQuery library but before the closing body tag.

1 <script src="//code.jquery.com/jquery.min.js"></script>
2 <script src="infinite-scroller.js"></script>
3 <link href="infinite-scroller.css" rel="stylesheet">

2. Create an html list for the infinite scroller.

1 <div id="example">
2   <ul>
3     <li><img src="1.jpg"></li>
4     <li><img src="2.jpg"></li>
5     <li><img src="3.jpg"></li>
6     ...
7   </ul>
8 </div>

3. Initialize the plugin to create a default scroller that will auto scroll on mouse hover.

1 $("#example").infinite<a href="https://www.jqueryscript.net/tags.php?/Scroll/">Scroll</a>er();

4. Enable the auto scroll on page load instead of mouse hover.

1 $("#example").infiniteScroller({
2   scrollOnMouseOver: false
3 });

5. Set the scroll direction.

1 $("#example").infiniteScroller({
2   direction: "left" // or "right"
3 });

6. Set the animation speed.

1 $("#example").infiniteScroller({
2   maxSpeed: 20,
3   speed: 1
4 });

7. If you’d like to reset the animation speed on mouse out:

1 $("#example").infiniteScroller({
2   resetOnMouseOut: true
3 });

Change log:

2017-04-07

  • Maintain original direction on mouse out

2017-04-06


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

source : jqueryscript.net