Weather Switcher 1.000001

By  on  

A while back, CSS-Tricks Tsar Chris Coyier and I created a Weather Switcher script that connected to Yahoo!'s weather API, downloaded an XML file containing weather information for a specified zip code, and modified the website's theme based on the weather.

Yahoo! recently made an update to their response script which blew up my script. I've updated the script and now everything is working as it should.

Click here to get the updated code.

Recent Features

Incredible Demos

  • By
    Firefox Marketplace Animated Buttons

    The Firefox Marketplace is an incredibly attractive, easy to use hub that promises to make finding and promoting awesome HTML5-powered web applications easy and convenient. While I don't work directly on the Marketplace, I am privy to the codebase (and so...

  • By
    Introducing MooTools LazyLoad

    Once concept I'm very fond of is lazy loading. Lazy loading defers the loading of resources (usually images) until they are needed. Why load stuff you never need if you can prevent it, right? I've created LazyLoad, a customizable MooTools plugin that...

Discussion

  1. russ

    I am having a problem trying to find out how to extract the degrees (e.g 85F) to display it along with the data you have provided. New to this, so any help would be most appreciated.

  2. I’ve put your weatherswitcher to work on my weather station site. The panoramic picture banner of the lake changes according to how the weather is doing. I love it. Thanks a bunch. http://stillwaterweather.com

  3. thor

    I’ve integrated the script pretty easy (despite I’m a nob). How can i know for sure day and night right codes for 27 mostly cloudy (night), 28 mostly cloudy (day), 29 partly cloudy (night) and 30 partly cloudy (day)? How can i declare this in according css? Thanks in advance!

  4. Anna

    hey, i was inspired by your other post, and extended it a little showing the users weather, instead of your own, take a look: http://www.reigndesign.com/blog/make-your-blog-weather-interactive-in-6-easy-steps/. thanks for the post in the first place :)

  5. Unfortunatetly, in recent days weatherswiticher has not been automatically changing the banner header picture to corresopond to the lastest change in weather conditions. I don’t know what’s wrong. It still reports weather condition changes though. Script in use at http://stillwaterweather.com

  6. @Danny: All is well now with the weather switcher at my site. I ran my css file thru a validator and got it fixed that way. As a result, the weather switcher works in any browser, too, that I have tried. I haven’t tried it in Oprah, though.

  7. Ryan

    How could I mod this to include the time. So I could change the image according to weather AND time of day?

    Thanks!

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!