jQuery Extend Function
What's the difference between $.extend($.ui.dialog.开发者_StackOverflow中文版prototype, {
and $.extend($.ui.dialog, {
?
The first one adds properties to the prototype of the "dialog" function, while the second adds properties to the "dialog" function object itself. The effect of the first one is to extend the "capabilities" of all instances of objects constructed through that function ("$.ui.dialog"). The second just adds properties to the function object itself, presumably constants or utility methods.
精彩评论