当前位置:嗨网首页>书籍在线阅读

11-讨论

  
选择背景色: 黄橙 洋红 淡粉 水蓝 草绿 白色 选择字体: 宋体 黑体 微软雅黑 楷体 选择字体大小: 恢复默认

14.1.3 讨论

本章介绍的是最新的稳定版本jQuery UI 1.7.2。它至少需要jQuery 1.3。当下载jQuery UI时,ZIP包里就包含了兼容的jQuery版本。

和托管自己的jQuery和jQuery UI版本不一样,可以使用Google的AJAX Libraries API。只要将脚本URL改成下面这样就可以了:

<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js "></script>

Google还托管了20多个jQuery UI ThemeRoller画廊中的主题。

<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/{themename}/jquery-ui.css" />

每个主题包含13张图片,在主题CSS中通过相对URL引用。

你可以用 baseblack-tieblitzercupertinodark-hivedot-luveggplantexcite-bikeflickhot-sneakshumanityle-frogmint-chocovercastpepper-grinderredmondsmoothnesssouth-streetstartsunnyswankypursetrontasticui-darknessui-lightness 或者 vader 代替 {themename} 。每个主题的预览可以参见jQuery UI ThemeRoller画廊(http://jqueryui.com/themeroller/#themeGallery)。

jQuery UI的主题在下一章中将详作介绍。对于我们来说,我们一定会包含某一个主题,因为主题是必需的。