I\'ve hooked up the JavaScript plugin \"Skycons\" to Yahoo weather RSS feed. The problem I am having is that multiple days may have the same weather forecast and because the
You should use the version that works with element references instead of id
(And change the html to use classes instead of ids)
for(i = list.length; i--; ) {
var weatherType = list[i],
elements = document.getElementsByClassName( weatherType );
for (e = elements.length; e--;){
icons.set( elements[e], weatherType );
}
}
and change your html to
- Saturday
19°
- Sunday
19°
- Monday
19°
- Wednesday
19°
If you need to support IE8 and older you need to use this polyfill for the getElementsByClassName function: Polyfill for getElementsByClassName for particular uses