有人可以解释覆盖默认属性,甚至在我的插件示例和闭包函数中使用 jQuery 扩展它们吗
$.fn.myObject = function(overwriteProperties) {
var properties = {myproperty1: "defaultvalue"}
// overwrite properties here
function doStuffHere() {
}
return (function() {
return this; // does this part here refer to the object of myDiv
});
}
$('#myDiv').myObject({myPoperty1:"newValue"});
最佳答案
关于javascript - 覆盖 jQuery 插件中的默认属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4551075/