It was a joke! :d Mootools provides access directly to all the Element
methods via the prototype and you never have to retrieve the dom
instance with $. It's just fun to think about it.
On 11 nov, 04:11, Mr Speaker wrote:
> BTW, just to be clear: there shouldn't EVER be a reason ever to do: $($
>
BTW, just to be clear: there shouldn't EVER be a reason 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
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").get
> > (0).addClass is not a function"
>
> Sor
2009/11/10 Savageman
> About .get(0), Firebug keeps telling me: "$(el).parents("div").get
> (0).addClass is not a function"
>
>
Sorry, I tested with .eq(0) instead of .get(0) which returns the pure DOM
element instead of a jQuery magic-array wrapping the element.
> I still find strange (that ev
@waseem sabjee: Don't know what to think of your answer... I already
figured to use .parents() without you... :)
@Michel Belleville: Wow, thank you for that wonderful answer! ;)
About .get(0), Firebug keeps telling me: "$(el).parents("div").get
(0).addClass is not a function"
I still find strang
5 matches
Mail list logo