Creating a new jQuery object can bring significant overhead. Sometimes, you might need to create an empty object, and fill it in with the add() method later.
This is also the basis for the quickEach() method that you can use as a faster alternative to the default each().
var container = $([]); container.add(another_element);
This is also the basis for the quickEach() method that you can use as a faster alternative to the default each().
No comments:
Post a Comment