jquery Common Plugins

Source: Internet
Author: User

Form validation plug-in----validate

jquery Plugin:

<script type= "Text/javascript" src= "Http://www.imooc.com/data/jquery.validate.js" ></script>< Script type= "Text/javascript" src= "Http://www.imooc.com/data/jquery.validate.messages_cn.js" ></script>

The plugin comes with validation rules that contain required, numeric, URL content, instant display of exception information, and also allows custom validation rules to be called by the plug-in as follows: $ (form). Validata ({options})

Where the form parameter represents the form element name, the options parameter represents the object that is configured when the method is called, and all validation rules and the location where the exception information is displayed are set in the object.

Form plug-in-----form

<script type= "Text/javascript" src= "Http://www.imooc.com/data/jquery.form.js" ></script>

Through the form from plug-in, calls the Ajaxform () method, implements the Ajax way to submit form data to the server, and obtains the data returned by the server through the options object in the method, the calling format is as follows:

$ (form). Ajaxform ({options})

Where the form parameter represents the form element name: Options is a configuration object that sets the data and parameters that are sent when the AJAX request is sent.

Photo Lightbox plug-in---lightBox

<script type= "Text/javascript" src= "Http://www.imooc.com/data/jquery.notesforlightbox.js" ></script>

The plugin can be rounded to show the selection of pictures, use the button to view the top and bottom picture, when loading the picture with a progress bar, but also to automatically play the way to browse the picture, the call format is as follows:

$ (linkimage). LightBox ({options})

Where the Linkimage parameter is the <a> element name that contains the picture, and options is the configuration object for the plug-in method

Picture Magnifier plug-in----jqzoom

<type= "Text/javascript"  src= "http://www.imooc.com/data/ Jquery.jqzoom.js "></script>

In the call Jqzoom Picture Magnifier plug-in, prepare a small two pictures, a small picture in the page, when the mouse in the small picture, call the plugin's Jqzoom () method, display the same large picture area with the small picture, thus realizing the effect of the magnifying glass, the calling format is as follows:

$ (linkimage). Jqzoom ({options})

Where the Linkimage parameter is a configuration object containing the image <a> element name, options as the plug-in method

Cookie Plugin----Cookie

After using the cookie plugin, it is convenient to save, read, delete the user's information through the cookie object, and also can save the user's browsing record through the cookie plugin, its calling format is:

Save: $.cookie (Key.value)

READ: $.cookie (key)

Deleted: $.cookie (Key.null)

Where key is the name of the cookie object to be saved, and value is the cookie that corresponds to the name

Search Plugin---AutoComplete

The function of the search plugin is to bind the text box by the AutoComplete () method of the plugin, and when the text box enters a character, the bound plug-in will return a string hint that is similar to the character, and the call format is as follows:

$ (textbox). AutoComplete (Urldata,[options]);

Where the textbox parameter is the text box element name, Urldata is the similar string data returned by the plug-in, the option parameter options are the parameters that are configured when the plug-in method is called.

jquery Common Plugins

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.