[jQuery] Re: Selection logic

2009-11-11 Thread Savageman
on ever to do: $($ > (el).parents('div').get(0)).addClass('blah') > > You'd just be getting all the parent divs, asking for their actual DOM > references (for no reason) then re-wrapping them into jQuery objects > before adding classes to them! > > On Nov 11,

[jQuery] Re: Selection logic

2009-11-10 Thread Savageman
Maybe $($(el).parents('div').get(0)).addClass() ? :d (ahah, what ugly syntax :d) Anyway thanks, topic solved! ;) On 10 nov, 15:04, Michel Belleville wrote: > 2009/11/10 Savageman > > > About .get(0), Firebug keeps telling me: "$(el).parents("div").g

[jQuery] Re: Selection logic

2009-11-10 Thread Savageman
7;ll be efficient with jQuery, don't > worry. Coming from another framework and re-learning the lingo is just a > phase, it's frustrating but it's worth it. And jQuery may be an acquired > taste but it's great once you're used to it. > > Michel Belleville > >

[jQuery] Selection logic

2009-11-10 Thread Savageman
ng! Can someone explain me why, so I become efficient with jQuery? Thank you in advance for the provided help. Sincerely, Savageman.