Home > Web Front-end > JS Tutorial > body text

jquery plug-in learning (1)_jquery

WBOY
Release: 2016-05-16 17:51:08
Original
980 people have browsed it

Closer to home, start learning with me :);

1.jquery has customized the jQuery.extend() and jQuery.fn.extend() methods, among which the jQuery.extend() method can create a global function Or selector, and jQuery.fn.extend() can create jQuery object methods. Let’s talk about it in a long way: Both of these two methods contain a parameter. The parameter only accepts objects with a name/value pair structure, where the name represents the function or method name, and the value represents the function body.

Copy code The code is as follows:

jQuery.extend({
minValue : function(a,b){
return a>b? b:a;
},
maxValue : function(a,b){
return a},
})


Copy code The code is as follows:

Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template