For JavaScript arrays, you use push() .
var a = []; a.push(12); a.push(32);
For jQuery objects, there is add() .
$('div.test').add('p.blue');
Please note: while push() changes the original array in place, add() returns a new jQuery object, it does not change the original.
Rocket Hazmat May 02 '11 at 20:01 2011-05-02 20:01
source share