Both ways do work, as demonstrated here:

http://jsbin.com/eruje/

On Jan 4, 5:53 pm, "Dirceu Barquette" <dirceu.barque...@gmail.com>
wrote:
> Thanks a lot!
> But it doesn't works... :-(
>
> I get a really dirty code to add modules. I wish inject a pretty good jQuery
> code, but is impossible!!!
>
> thanks your attention!
>
> Dirceu Barquette
>
> 2009/1/4 John Resig <jere...@gmail.com>
>
>
>
> > 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

Reply via email to