On Feb 26, 7:28 am, Lox <gecka.comp...@gmail.com> wrote:
> > [...] then prototype is becoming the mature
> > and stable platform for standardised/cross platform javascript
> > development.
> I understand that, and quite second that, but Peppy or Sizzle are much
> more faster at selecting elements by css selector witch, these days
> where javascript apps a getting bigger, is a must have.

Don't get to wrapped-up in javascript CSS selectors.  Most browsers
have a host getElementsByClassName that has the benefit of being a
live collection (get it once, update the DOM all you like, the
collection is automatically updated for you).  When combined with
getElementById, getElementsByTagName and standard DOM collections, you
can do an awful lot easily and quickly.

Further, complex CSS selectors tie your code to the page layout -
isn't the idea to separate the two?

Lastly, they encourage rubbish like: tagName#someID, which is used in
style rules because it helps the developer, but using it in a script
selector is just plain dumb.

I can understand the use of selectors for prototyping or small things
where speed is irrelevant, but using them as a fundamental strategy to
get large sets of elements doesn't make sense.  Write a function to do
it using standard host methods, it will perform much faster and be
easier to work with.

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to