Plugin submitted by codehandling
Wheatro plugin displays wheater to your visitor on your website :
- get the geographic location of any user on your website and display a weather status of that particular location on your website.
- the weather status is pulled using APIs exposed by wunderground.com.
- weather status of the current day and the next three days is pulled and available to this widget.
- you may then choose the number days (min 1 to max 4) for which you want to display the status.
The download pack contains the plugin file weathro.min.js and the HTML file weather.html that I have deployed in my live demo.
Just visit API console of wunderground. Sign up for a free account and you will be provided with an API key!
Note down this API Key Id provided to you.
var wundergroundAPIKey="1a-----------cd"; var maxWeathroDays = 2;
"maxWeathroDays" is the maximum number of days for which weather status will be displayed. Acceptable values are 1,2,3 or 4. This is because weather status of 4 days is available to this widget (current day and next 3 days).
Before your body tag ends in your HTML, include the plugin as shown
Weather is now on your website !
Weather location depends on the user visiting your website. So if a user from (New York,US) visits your website, he will be shown the weather status for New York.
Let me know if any issues.