我碰到这个syntaxt来了很多次,在JavaScript或jQuery插件jQuery插件语法/ JavaScript语法?
$.fn.testPlugin = function(options) {
// Create some defaults, extending them with any options that were provided
var settings = $.extend({
'location' : 'top',
'background-color' : 'blue'
}, options);
我明白了功能扩展,但什么后$.extend({})
是我也不清楚。