Ultra-Concise jQuery content slide plug-in and jquery slide plug-in

Source: Internet
Author: User

Ultra-Concise jQuery content slide plug-in and jquery slide plug-in

SummaryThe content slide plug-in allows you to display more content in a limited space. Many such plug-ins have been recommended for the Force Technology. Today, we also recommend a content slide plug-in-Basic jQuery Slider. Basic jQuery Slider is a lightweight and concise jQuery content slide plug-in, which is only 4.6kb after compression.

The content slide plug-in allows you to display more content in a limited space. Many such plug-ins have been recommended for the Force Technology. What you want to recommend today is a content slide plug-in-Basic jQuery Slider.

Basic jQuery Slider is a lightweight and concise jQuery content slide plug-in, which is only 4.6kb after compression. It can be used to display any HTML content such as text and images. This plug-in does not have many fancy functions. It only includes some basic functions and implements two animation switching effects: fade and slide. In addition to button navigation, it also supports keyboard control. The biggest feature of this plug-in is the support for custom theme styles, which can create a very beautiful effect. Frontend UI sharing

How to Use

First, introduce jQuery and Basic jQuery Slider plug-ins on the page.

. Code
  1. <Script src = "jquery-1.4.2.min.js"> </script>
  2. <Script src = "basic-jquery-slider.js"> </script>

 

Add the required HTML code below. ul must set class = "bjqs"

. Code
  1. <Div id = "slideshow">
  2. <Ul class = "bjqs">
  3. <Li> <! -- Arbitrary content --> </li>
  4. </Ul>
  5. </Div>

 

Initialize the plug-in and share the front-end UI

. Code
  1. $ ('# Slideshow'). bjqs ({
  2. 'Width': 940,
  3. 'Height': 340,
  4. 'Showmarkers': true,
  5. 'Showcontrols': true,
  6. 'Centermarkers': false
  7. });

 


Simple demo of jquery plug-ins with Parameters

(Function ($ ){
$. Fn. Plug-In = function (options ){
Var defaultOptions = {
Parm1: null,
Parm2: null
};
Var optionValue = $. extend (defaultOptions, options );
$ (This). load (function (){
Alert ("I Am a plug-in:" + optionValue. parm1 );
});
};
}) (JQuery );

// Call:
$ ("Body"). Plug-in ({parm1: "First parameter of the plug-in "});

What is the difference between jquery and jquery plug-ins?

JQuery is a framework of js and a common function of encapsulated js.
The jQuery plug-in is obviously an extension function based on jQuery. That is to say, the functions you often use are encapsulated by interfaces provided by jQuery, and become jQuery-based plug-ins.
That is to say, the jQuery plug-in is an extension of the jQuery library!

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.