I wanted to create an empty jQuery object and add elements to it for
later use but I couldn't get it to work.  Eventually I started
experimenting and discovered the following:

var test = $('form').add ('li');
console.log (test);

will return a jQuery object containing a list of forms plus a list of
li elements.


var test = $('form');
test.add ('li');
console.log (test);

will return a jQuery object as well but this time it only contains the
form elements.

Is this what's supposed to happen or is it a bug?  It happened with
both 1.1.2 and 1.1.3a as the jQuery library.

Reply via email to