JQuery simple rolling plug-in

Source: Internet
Author: User
JQuery simple rolling plug-in /**

* 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

  • )

    // 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.

    Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.