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
- <Script src = "jquery-1.4.2.min.js"> </script>
- <Script src = "basic-jquery-slider.js"> </script>
Add the required HTML code below. ul must set class = "bjqs"
. Code
- <Div id = "slideshow">
- <Ul class = "bjqs">
- <Li> <! -- Arbitrary content --> </li>
- </Ul>
- </Div>
Initialize the plug-in and share the front-end UI
. Code
- $ ('# Slideshow'). bjqs ({
- 'Width': 940,
- 'Height': 340,
- 'Showmarkers': true,
- 'Showcontrols': true,
- 'Centermarkers': false
- });
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!