jquery control Li Upper and lower loop scroll plug-in usage example (with demo source download) _jquery

Source: Internet
Author: User
Tags php code setinterval

This article describes the usage of the jquery control Li Loop Scroll plug-in. Share to everyone for your reference, specific as follows:

/** * * JQuery SCROLLQ plugin li up and down scroll plugin * @name jquery-scrollq.js * @author Q * @date 2012-03-23 * Line shows Li row number * SC
  Rollnum per scrolling li line * scrolltime scrolling speed Unit milliseconds */(function ($) {var status = false; $.FN.SCROLLQ = function (options) {var defaults = {Line:4, scrollnum:2, scrolltime:1000} VA
    R Options=jquery.extend (defaults,options);
    var _self = this;
      Return This.each (function () {$ (' Li ', this '). each (the function () {$ (this). CSS ("display", "none");
      }) $ ("Li:lt (" +options.line+ ")", this). each (the function () {$ (this). CSS ("Display", "block");
          }) function Scroll () {for (i=0;i<options.scrollnum;i++) {var start=$ ("Li:first", _self);
          Start.fadeout (100);
          START.CSS ("Display", "none");
          Start.appendto (_self);
            $ ("Li:eq (" + (options.line-1) + ")", _self). each (function () {$ (this). FadeIn (500);
          $ (this). CSS ("Display", "block");
 })
        }     } var timer;
      Timer = setinterval (scroll,options.scrolltime);
      _self.bind ("MouseOver", function () {clearinterval (timer);
      });
      _self.bind ("Mouseout", function () {timer = setinterval (scroll,options.scrolltime);
    });
  });

 }) (JQuery);

The

is invoked as follows:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">  

Full instance code click here to download the site.

PS: Here again for you to recommend a few code formatting, landscaping tools, I believe that we will use in the future development process:

Online JavaScript code Landscaping, formatting tools:
Http://tools.jb51.net/code/js

JavaScript compression/formatting/encryption tool:
http://tools.jb51.net/code/jscompress

PHP code online format Landscaping tools:
Http://tools.jb51.net/code/phpformat

XML code online formatting landscaping tools:
Http://tools.jb51.net/code/xmlcodeformat

JSON code online Format/beautify/compress/edit/Convert tools:
Http://tools.jb51.net/code/jsoncodeformat

Online JSON code inspection, inspection, landscaping, formatting tools:
Http://tools.jb51.net/code/json

More interested readers of jquery-related content can view the site's topics: A summary of Ajax usage in jquery, a summary of jquery table (table) operations tips, a summary of jquery drag-and-drop effects and techniques, a summary of jquery extension techniques, jquery Common Classic Effects Summary "jquery animation and special effects usage Summary", "jquery selector usage Summary" and "jquery common Plug-ins and Usage summary"

I hope this article will help you with your jquery programming.

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.