3

What's the difference between $.extend($.ui.dialog.prototype, { and $.extend($.ui.dialog, {?

asked Nov 13, 2010 at 13:34

1 Answer 1

3

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.

answered Nov 13, 2010 at 13:36
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.