zWeatherFeed options?
-
25-06-2021 - |
Question
I used zWeatherFeed to show weather, but I cant find any example to change options.
<style>
.weatherItem{padding-left:200px;}
.odd{height:130px;}
.weatherCity{font-weight:bold;}
.weatherFeed{height: 130px; width: 100%;}
</style>
<script type="text/javascript">
$(document).ready(function () {
$('#test').weatherfeed(['TUXX0015']);
});
</script>
<div id="test">
</div>
For example I want to show next day too. Is there any example about this weather plugin or any alternative weather plugin? I prefer to use zWeatherFeed because This plugin has great visualization.
Thanks.
Solution
The zWeatherFeed plugin is not able to show the next day's forecast at present (although provides a link for a full forecast). The available options are:
- unit - Specifies the units to return: 'c' - celsius, 'f' - fahrenheit
- image - If true, displays an image of the weather condition in the background.
- highlow - If true, includes the high and low values in each item.
- wind - If true, includes the wind direction and strength in each item.
- link - If true, includes the link to full forecast on the Yahoo! website.
- showerror - If true, displays a message if the feed is unavailable or the location is invalid.
- linktarget - Specifies the target for forecast links ('_blank', '_self', '_top', framename).
- woeid - If true, uses Yahoo! WOEID indentifiers for locations
OTHER TIPS
<script type="text/javascript">
$(document).ready(function () {
$('#weatherDiv').weatherfeed(['EIXX0048'], {
forecast: true
});
});
</script>
If you add the option forecast:true to the options for the function and it will show the forecast for the next 5 days. An full example can be seen at: http://www.zazar.net/developers/jquery/zweatherfeed/example_forecast.html