I have created an array of jquery objects that I want to hide when a particular click event is triggered. Instead of looping through the contents of the same array for each click event can I transform the array into a single object or something that I can just attach a method on to?
I have a current fiddle here: http://jsfiddle.net/hd5qa/13/
Sorry if this sounds vague, I’m not sure how to best explain this.
Kyle
Yes. You can create an empty jQuery object and then call
.addon it for each element.See your updated demo on JSFiddle.