今天我发现了包含 jquery 和 jqueryui 的其他“标准方式”:
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
还有另一种方法,使用 google jsapi:
<script src="//www.google.com/jsapi"></script>
<script>
google.load("jquery", "1.4.2");
google.load("jqueryui", "1.7.2");
$(function() { $( document ).tooltip(); });
</sciprt>
jsapi方法更好吗?
因为我尝试过 jsapi 方法,但似乎只适用于 jquery 而不适用于 jqueryui,实际上工具提示没有显示。怎么了?我也应该包含 jquery css 吗?或者我需要一把钥匙?