At 12:04 AM +0100 3/25/08, Peter De Berdt wrote: > >Just use $A(document.getElementsByClassName('foo')) instead of >document.getElementsByClassName('foo') and you will have an array of extended >elements, which is what you probably want. Simple workaround and haven't had >any problems with it yet, both on Safari 3.1 and Firefox 3 beta (which also >implements a native getElementsByClassName.
This is a good thing to know but Safari 3.1's new implementation of getElementsByClassName does not seem to use the parentElement parameter so I get elements for the whole page... not what I needed. At 4:03 PM -0600 3/24/08, Dan Dorman wrote: >On Mon, Mar 24, 2008 at 4:02 PM, Dan Dorman <[EMAIL PROTECTED]> wrote: >> $('node-id').select('class-name'); > >Oops: $('node-id').select('.class-name'); yep, .select did it. For the record, I changed: elms = document.getElementsByClassName('classname',parentElement); into elms = $(parentElement).select('.classname'); The $ is handy when the element isn't yet extended OR is an id and don't forget to put the '.' in front of the class name to make it a class selector. Thanks for your help. Regards, Steve ________________________________________________________________________ o Steve Upton CHROMiX www.chromix.com o (hueman) 866.CHROMiX ________________________________________________________________________ -- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---