============================================= jQuery Weather Widget Powered by Google weather api Author Stanko Tadić stanko87 [at] gmail [dot] com You can use and abuse it, as long the link back to home page stays intact Both links must stay, the one on the widget itself, and the one in the source code ;) Widget home page http://sale.mfhinc.net/2010/04/24/jquery-weather-widget/ ============================================= What is it: ============================================= Weather Widget displays current weather conditions and the four day forecast for the selected cities. If multiple cities are selected, select box will be shown. It gets weather information from Google weather api via php file. File structure: weather-widget/ google-weather.php weather-widget.css jquery.weather-widget.js jquery.weather-widget-min.js example.html readme.txt How it works: ============================================= Weather Widget uses google-weather.php to get XML file from Google weather api for selected cities and language. Then XML file is parsed and weather information is displayed, using Ajax requests which are done by jQuery. How to install: ============================================= 1. Copy whole 'weather-widget' folder somewhere in your hosting. 2. Be sure to have JQuery, or just insert in your head tag: 3. Edit page where you want to put widget and insert:
(Note that widget itself is 180px wide and floats left.) Put this in header of your page Available options (default options displayed) ============================================= url path to google-weather.php file language language in ISO format (en, sr...) cities arrays of cities, in one of following formats, second string is the name which will be displayed name - "belgrade", "Belgrade", postal code - "10099","New York" coordinates (notice 3 comas) - ",,,43724590,19707284","Zlatibor" showForecast if set to false, "Show forecast" link will not be displayed showForecastString text for "Show forecast" link hideForecastString text for "Hide forecast" link hideCurrentConditions if set to false, current conditions will not be hidden when displaying forecast Download: ============================================= Please note, if you downloaded files to your computer it won’t work properly unless you start it through web server since it uses AJAX requests.