From: Steve Upton <clang...@gmail.com>
Date: Tue, 25 Mar 2008 10:53:45 -0700
Local: Tues, Mar 25 2008 1:53 pm
Subject: [Rails-spinoffs] Re: Safari 3.1 and getElementsByClassName
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. At 4:03 PM -0600 3/24/08, Dan Dorman wrote: >On Mon, Mar 24, 2008 at 4:02 PM, Dan Dorman <dan.dor...@gmail.com> wrote: yep, .select did it. >> $('node-id').select('class-name'); >Oops: $('node-id').select('.class-name'); 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 ________________________________________________________________________ You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||