jquery--Common Plugins

Source: Internet
Author: User

1. Validate () Form validation plugin,contains the required, numeric, URL in the content of the validation rules, instant display of exception information, allow the custom validation rules, call method$ (form). Validate ({options})

2 The form parameter represents the form element name, the options parameter represents the configuration object when the method is called, and all validation and exception information displays are set in the object, such as when clicking the Submit button in the form, calling the validate plug-in to verify that the user name input conforms to the rule. and display the exception information in the page

3. Form () form plug-in, call the Ajaxform () method, implement the Ajax way to submit form data to the server, and through the options object in the method to get the server return data, call format $ (form). Ajaxform ({options})

4 the form parameter represents the form element name, and options is a configuration object that is used to send the AJAX request process, set the data and parameters when sent, such as clicking on the "Submit" button on the page, calling the form plug-in's Ajaxform () method to send the input user name and password data to the server, The server is returned and displayed in the page after it is received

5. LightBox () Picture Lightbox plugin, you can use rounded corners to display the pictures in the selection, using the buttons to view the top and bottom pictures, when loading the picture with a progress bar, but also to automatically play the way to browse the picture, call format $ (linkimage). LightBox ({options})

6 The Linkimage parameter is the <a> element name that contains the picture, and options is the configuration object for the plug-in method. as a list of all the pictures in the page, when the user clicks one of the pictures, through the introduction of the picture plug-in, the "Lightbox" way to display the selected picture

7. Jqzoom () Picture Magnifier plugin, when calling the Jqzoom Picture Magnifier plug-in, you need to prepare a small two pictures, a small picture in the page, when the mouse in the small picture, call the plug-in, display the same large picture area with the small picture, thus realizing the effect of magnifying glass, calling format $ ( linkimage). Jqzoom ({options})

8 The Linkimage parameter is the <a> element name that contains the picture, and options is the configuration object for the plug-in method. as in the page, add a picture element that is contained by the <a> element, and when you move the mouse over the picture element, on the right side of the picture, the zoomed-in selected area effect is displayed

kie plug-in, $.cookie (Key,value) , read $.cookie (key) , delete $.cookie (key,null)

10   parameter key is the name of the cookie object to be saved, Value for the name corresponding to the cookie values, If you click the "Settings" button, if the "No Save user name" check box is selected, use the cookie object to save the user name, otherwise, delete the saved cookie user name

 .autocomplete () method is bound to a text box, When the text box enters a character, the bundled plug-in will return a string hint similar to the character's selection, calling the format $ (textbox)  .autocomplete () (urldata,[options])

autocomplete () method returns the string data that matches the input content, displayed under the text box, prompting you to select

ContextMenu () Right-click menu plugin, can be bound to any element of the page, after binding, select the element, right-click, then through the plug-in popup A shortcut menu, click the menu name to do the corresponding action, call code $ (selector). ContextMenu (Menuid,{options})

The selector parameter is the element of the binding plug-in, Meunid is the shortcut menu element, options for the configuration object, such as the selection of pages <textarea> elements, right click, pop-Up plugin binding shortcut menu, click on the menu of the various options, Displays the corresponding name of the action in the page

Lifocuscolor () custom object-level plugins, In the <ul> element, when the mouse is moved in a table item <li> element, it customizes the background color when it gets focus, that is, the background color when the <li> element is selected, and the calling format $ (Id). Focuscolor (color), The parameter ID represents the ID number of the <ul> element, and color indicates the background color of the <li> element when selected

Twoaddresult () custom class-level plug-ins,you can add and subtract two values, and after importing the plug-in, call the format $.addnum (P1,P2) and $.subnum (P1,P2),The results of the addition and subtraction of two values are calculated separately, and P1 and P2 are arbitrary values, such asEnter any number in the two text boxes of the page and click the "Calculate" button to invoke the custom plugin$.addNum()method, calculates the value of two values, and displays the result in another text box

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.