Created
January 23, 2014 09:21
-
-
Save aloncarmel/8575527 to your computer and use it in GitHub Desktop.
Yahoo Weather codes http://developer.yahoo.com/weather/#codes to http://erikflowers.github.io/weather-icons/ icons.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setWeatherIcon(condid) { | |
switch(condid) { | |
case '0': var icon = '<i class="wi-tornado"></i>'; | |
break; | |
case '1': var icon = '<i class="wi-storm-showers"></i>'; | |
break; | |
case '2': var icon = '<i class="wi-tornado"></i>'; | |
break; | |
case '3': var icon = '<i class="wi-thunderstorm"></i>'; | |
break; | |
case '4': var icon = '<i class="wi-thunderstorm"></i>'; | |
break; | |
case '5': var icon = '<i class="wi-snow"></i>'; | |
break; | |
case '6': var icon = '<i class="wi-rain-mix"></i>'; | |
break; | |
case '7': var icon = '<i class="wi-rain-mix"></i>'; | |
break; | |
case '8': var icon = '<i class="wi-sprinkle"></i>'; | |
break; | |
case '9': var icon = '<i class="wi-sprinkle"></i>'; | |
break; | |
case '10': var icon = '<i class="wi-hail"></i>'; | |
break; | |
case '11': var icon = '<i class="wi-showers"></i>'; | |
break; | |
case '12': var icon = '<i class="wi-showers"></i>'; | |
break; | |
case '13': var icon = '<i class="wi-snow"></i>'; | |
break; | |
case '14': var icon = '<i class="wi-storm-showers"></i>'; | |
break; | |
case '15': var icon = '<i class="wi-snow"></i>'; | |
break; | |
case '16': var icon = '<i class="wi-snow"></i>'; | |
break; | |
case '17': var icon = '<i class="wi-hail"></i>'; | |
break; | |
case '18': var icon = '<i class="wi-hail"></i>'; | |
break; | |
case '19': var icon = '<i class="wi-cloudy-gusts"></i>'; | |
break; | |
case '20': var icon = '<i class="wi-fog"></i>'; | |
break; | |
case '21': var icon = '<i class="wi-fog"></i>'; | |
break; | |
case '22': var icon = '<i class="wi-fog"></i>'; | |
break; | |
case '23': var icon = '<i class="wi-cloudy-gusts"></i>'; | |
break; | |
case '24': var icon = '<i class="wi-cloudy-windy"></i>'; | |
break; | |
case '25': var icon = '<i class="wi-thermometer"></i>'; | |
break; | |
case '26': var icon = '<i class="wi-cloudy"></i>'; | |
break; | |
case '27': var icon = '<i class="wi-night-cloudy"></i>'; | |
break; | |
case '28': var icon = '<i class="wi-day-cloudy"></i>'; | |
break; | |
case '29': var icon = '<i class="wi-night-cloudy"></i>'; | |
break; | |
case '30': var icon = '<i class="wi-day-cloudy"></i>'; | |
break; | |
case '31': var icon = '<i class="wi-night-clear"></i>'; | |
break; | |
case '32': var icon = '<i class="wi-day-sunny"></i>'; | |
break; | |
case '33': var icon = '<i class="wi-night-clear"></i>'; | |
break; | |
case '34': var icon = '<i class="wi-day-sunny-overcast"></i>'; | |
break; | |
case '35': var icon = '<i class="wi-hail"></i>'; | |
break; | |
case '36': var icon = '<i class="wi-day-sunny"></i>'; | |
break; | |
case '37': var icon = '<i class="wi-thunderstorm"></i>'; | |
break; | |
case '38': var icon = '<i class="wi-thunderstorm"></i>'; | |
break; | |
case '39': var icon = '<i class="wi-thunderstorm"></i>'; | |
break; | |
case '40': var icon = '<i class="wi-storm-showers"></i>'; | |
break; | |
case '41': var icon = '<i class="wi-snow"></i>'; | |
break; | |
case '42': var icon = '<i class="wi-snow"></i>'; | |
break; | |
case '43': var icon = '<i class="wi-snow"></i>'; | |
break; | |
case '44': var icon = '<i class="wi-cloudy"></i>'; | |
break; | |
case '45': var icon = '<i class="wi-lightning"></i>'; | |
break; | |
case '46': var icon = '<i class="wi-snow"></i>'; | |
break; | |
case '47': var icon = '<i class="wi-thunderstorm"></i>'; | |
break; | |
case '3200': var icon = '<i class="wi-cloud"></i>'; | |
break; | |
default: var icon = '<i class="wi-cloud"></i>'; | |
break; | |
} | |
return icon; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Me tooo!!, you ROCKS! Thanks A LOT!