$('document').ready(function() { $h1elements = $("h1"); //use add to add the h2 elements to $h1elements $h1andH2elements = $h1elements.add("h2"); });