Home > Web Front-end > JS Tutorial > body text

jQuery simple scroll plugin

高洛峰
Release: 2016-11-25 13:46:15
Original
1477 people have browsed it

/**

* Rolling advertising (link) plug-in

*

* I wrote this "jq plug-in" because of the needs of the website. I don't know if it meets the standards of jq plug-in. Anyway, it can be used^^^

*

* The effect used when displaying list items is jq's fadeIn. If you want to customize this behavior, execute the following code

* rollbar.setShowHandler(function(currentItem){});

* where currentItem is the jq of the element to be displayed. Object instance

*

* Obtain the rollbar bound to this containerId (no # required) by calling $.rollbar.get(containerId). If it does not exist, return null

*

* Usage method:

* $(function(){                                                                                                                                                                                                                                  . li class = 'item' & gt; & lt;/li & gt;)

// 3000 -& gt; rolling time interval, unit millisecond

// "current" -& gt; All elements will contain this class

var rollbar = $.rollbar.start("rollbar","item","current",3000); // After the call, the scrolling will start

$(" #roll-button-prev").click(function(){

                                                                                                                       rollbar.prev                                                                                                                                                    . (){

                                                                                                                                                                                                                            rollbar. mouseover(function(){

                                                                                                                                                              bar.restart(); // Start scrolling

});

});

});

*

* Author: pcenshao

* Website: http://www.todayx.org (Today in History)

* Home page: http:/ /hi.csdn.net/pywepe

* Email: pcenshao@qq.com

*/

Note: Since it is a "plug-in" of jQuery, it naturally relies on jQuery

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template