it decorates objects, so I think it is, but I’m not sure.
example
jQuery(document).hide()
changes the document object by adding extra style.
EDIT:
If its not the Decorator Design Pattern? than what is it? There must be a pattern name for it!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
jQuery best fits the facade pattern, as it does “define a higher-level interface that makes the subsystem easier to use.” For example,
.css()and.hide()are features designed for ease of use, and so is jQuery’s ability to perform an action to multiple elements at once:jQuery only even seems to fit the decorator pattern in such ways as its animation functionality. Normal HTML DOM elements do not offer timed animations and attached queues, so jQuery adds that. In most other areas, jQuery provides the same functionality as available by accessing the underlying DOM elements directly.
But even there, it really doesn’t fit, as jQuery is not “dynamically keeping the same interface.”