Javascript jQuery插件-选项卡小部件
我正在学习javascript——更准确地说是javaqueryuiJavascript jQuery插件-选项卡小部件,javascript,jquery,Javascript,Jquery,我正在学习javascript——更准确地说是javaqueryui <!Doctype html> <html> <head> <title> 17. Installing and utilizing jQuery plugins</title> <script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.2.js"&g
<!Doctype html>
<html>
<head>
<title> 17. Installing and utilizing jQuery plugins</title>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.0.2.js"> </script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.17/jquery-ui.min.js"> </script>
<script type="text/javascript" src="j17.js"> </script>
<link rel="stylesheet" type="text/css" href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.4/themes/dot-
luv/jquery-ui.css" />
</head>
<body>
<h1 id="title"> 17. Installing and utilizing jQuery plugins </h1>
<div id="tabs">
<ul>
<li><a href="#tabs-1">Nunc tincidunt</a></li>
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
<div id="tabs-1">
<p>Proin elit arcu.</p>
</div>
<div id="tabs-2">
<p>Morbi tincidunt.</p>
</div>
<div id="tabs-3">
<p>Mauris eleifend est et turpis. </p>
<p>Duis cursus.</p>
</div>
</div>
</body>
</html>
所有其他外部脚本文件都是从internet引用的,而不是本地下载的(如src属性所示)您的库可能有问题 我在JSFIDLE上尝试了你的代码,但没有成功。然后,我尝试包括示例中的外部库:
您的HTML和JS代码开始使用链接()=>库链接错误或冲突
所以。。。尝试其他来源。。。检查官方jQueryUI站点上的示例
$(function() {
$( "#tabs" ).tabs();
});
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>