Forum Moderators: open
We have to be able to do some things with each of these widgets. Is there away that we can do a document.getElementbyId() and get an array of all matching elements?
For what we are doing we are running into a problem with Firefox.
Any pointers would be much appreciated. Thanks.
Most browsers don't break if it isn't though, but I agree, it definitely should be.
The jQuery way:
// Get all elements with class 'myclass'
var nodes = $('.myclass');
The YUI 2.7.0 Selector way:
// Get all elements with class 'myclass'
var nodes = YAHOO.util.Selector.query('.myclass');
The YUI 2.7.0 getElementsByClass way:
// Get all elements with class 'myclass'
var nodes = YAHOO.util.Dom.getElementsByClassName('myclass');
Just a few examples.