On Aug 21, 11:08 am, "Per Cederberg" <[EMAIL PROTECTED]> wrote: > Could you provide a simple example on how this MochiKit.DOMSelector > class is supposed to be used. Compared to the current way to do > things. >
<pre> // hide all DIV elements with CLASS hideme MochiKit.get('div.hideme').fade({from: 1.0, to: 0.0}); // add CLASS showme to all other DIV elements then CLASS hideme MochiKit.get('div').filter(':not(.hideme)').addClass('showme'); // show all DIV elements with CLASS showme MochiKit.get('div').filter('.showme').appear({from: 0.0, to: 1.0}); // the above two can be chained like this MochiKit.get('div').filter(':not(.hideme)').addClass('showme').appear({from: 0.0, to: 1.0}); </pre> > I agree that there is some utility to mixing in additional functions > into DOM objects, like for instance Prototype does. But I'm not so > sure that it should be done by default in MochiKit. > No, I don't favor altering of the native JavaScript objects including DOM objects. The proposed DOMSelector class should use `MochiKit.Selector` functions to extend the library with features like JQuery. > > Cheers, > > /Per --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---