/**
* Rolling advertisement (Link) Plug-in
*
* Because the website needs to write this "jq plug-in", I do not know whether it meets the jq plug-in standards. It can be used anyway ^
*
* The result of displaying the list items is the fadeIn of jq. to customize this behavior, run the following code:
* Rollbar. setShowHandler (function (currentItem ){});
* CurrentItem is the jq object instance of the element to be displayed.
*
* Call $. rollbar. get (containerId) to obtain the rollbar bound to this containerId (# Not Required). If it does not exist, null is returned.
*
* Usage:
* $ (Function (){
// Parameter description: "rollbar"-> list item container id (not required #)
// "Item"-> class of the list item (for example, <li class = 'item'> </li>)
// 3000-> scroll interval, in milliseconds
// "Current"-> additional class of the display element. Each element being displayed will contain this class
Var rollbar = $. rollbar. start ("rollbar", "item", "current", 3000); // after the call, the scroll starts.
$ ("# Roll-button-prev"). click (function (){
Rollbar. prev (); // display the previous
});
$ ("# Roll-button-next"). click (function (){
Rollbar. next (); // display the next
});
$ (". Rollbar-item-a"). each (function (){
$ (This). mouseover (function (){
Rollbar. stop (); // stop scrolling
});
$ (This). mouseout (function (){
Rollbar. restart (); // Start scrolling
});
});
});
*
* Author: pcenshao
* Website: http://www.todayx.org (today in History)
* Home: http://hi.csdn.net/pywepe
* Email: pcenshao@qq.com
*/
Note: Since it is jQuery's "plug-in", it naturally depends on jQuery.
Http://www.bkjia.com/uploadfile/2011/1015/20111015014440457.rar