
Что это делает? (Я знаю, что он каким-то образом расширяет jQuery, но есть ли что-нибудь еще интересное об этом)
Код: Выделить всё
(function($) {
})(jQuery);
Тип 1:
Код: Выделить всё
(function($) {
$.fn.jPluginName = {
},
$.fn.jPluginName.defaults = {
}
})(jQuery);
Код: Выделить всё
(function($) {
$.jPluginName = {
}
})(jQuery);
Код: Выделить всё
(function($){
//Attach this new method to jQuery
$.fn.extend({
var defaults = {
}
var options = $.extend(defaults, options);
//This is where you write your plugin's name
pluginname: function() {
//Iterate over the current set of matched elements
return this.each(function() {
//code to be inserted here
});
}
});
})(jQuery);
Подробнее здесь: https://stackoverflow.com/questions/293 ... query-mean