Not works too... Thank you.
Dirceu Barquette 2009/1/4 Kean <shenan...@gmail.com> > > This might be shorter. > > $("#container > :not(#header, #content, #footer)").empty(); > > - Kean > > Tested with Sizzle but not jQuery 1.2.6 > > On Jan 4, 11:08 am, "John Resig" <jere...@gmail.com> wrote: > > Maybe: > > $("#container").children().not("#header, #content, #footer").empty(); > > > > --John > > > > On Sun, Jan 4, 2009 at 2:05 PM, Dirceu Barquette > > > > <dirceu.barque...@gmail.com> wrote: > > > Hi all! > > > > > Is there better way? > > > > > var elem = $('#container')[0]; > > > var arr = ["header","content","footer"]; > > > jQuery.each(elem.childNodes,function(k,v) { > > > if (jQuery.inArray(v.id, arr) < 0) { > > > $(v).empty(); > > > } > > > }) > > > > > thanks > > > > > Dirceu Barquette >