zWeatherFeed选项?

时间:2012-08-07 08:46:59

标签: asp.net-mvc weather yahoo-weather-api

我使用zWeatherFeed来显示天气,但我找不到任何改变选项的例子。

<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>

例如我想要在第二天展示。有关于这个天气插件或任何其他天气插件的任何示例吗?我更喜欢使用zWeatherFeed,因为这个插件具有很好的可视化效果。

感谢。

2 个答案:

答案 0 :(得分:1)

zWeatherFeed插件目前无法显示第二天的预测(尽管提供了完整预测的链接)。可用选项包括:

  • unit - 指定要返回的单位:'c' - 摄氏度,'f' - 华氏度
  • image - 如果为true,则显示天气状况的图像 背景
  • highlow - 如果为true,则包括每个项目中的高值和低值。
  • wind - 如果为true,则包括每个方向的风向和强度 项目
  • link - 如果为true,请在Yahoo!上包含指向完整预测的链接 网站。
  • showerror - 如果为true,则在Feed无法使用时显示消息 该位置无效。
  • linktarget - 指定预测链接的目标('_ blank', '_self','_ top',framename)。
  • woeid - 如果是,请使用Yahoo!位置的WOEID标识符

http://www.zazar.net/developers/jquery/zweatherfeed/

答案 1 :(得分:0)

<script type="text/javascript"> $(document).ready(function () { $('#weatherDiv').weatherfeed(['EIXX0048'], { forecast: true }); }); </script>

如果添加选项 预测:真 到该功能的选项,它将显示接下来5天的预测。一个完整的例子可以在: http://www.zazar.net/developers/jquery/zweatherfeed/example_forecast.html