What does #container look like? Can you post an example of just that
element with its HTML?

On Mon, Jan 5, 2009 at 12:53 AM, Dirceu Barquette
<dirceu.barque...@gmail.com> wrote:
> Hi Ricardo,
>
> Thats right! I know it works. But not with the dirty code of my job, both
> doesn't work...
> You are from Brazil like me. Don't you?
> See the project at:
> http://calango.barquettenet.net/~dirceu/cva    //login:dirceu,
> password:senha
> you can click at "Adicionar projetos". I injected jQuery at this link. My
> goal is bypass the dirty code, but... arghhhh.
>
> using firebug, change the second index of array to "menu_lateral_usuario".
> It seems like this:
>    var a = $('#container')[0];
>    var arr = ["header","menu_lateral_usuario","footer"];
>    jQuery.each(a.childNodes,function(k,v){
>       if (jQuery.inArray(v.id,arr) < 0){
>          $(v).empty();
>       }
>    })
> The above code works (imediatly after login...), but:
> $("#container").children().not("#header, #content, #footer").empty();
> //JResig code
> and
> $("#container > :not(#header, #content, #footer)").empty(); //Kean code
> Both these very clean codes doesn't work... I don't know why, but can help
> me in the future.
>
> You know for my poor english. I really appreciate your help to explain this
> problem. We can chat at gmail if you wish...
>
> Very special thanks to all!
>
> Dirceu Barquette
>
> 2009/1/5 Ricardo Tomasi <ricardob...@gmail.com>
>>
>> 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