$(...).tabs不是函数 [英] $(...).tabs is not a function
问题描述
我在网站的两页上都有此代码,但是在一页上,该功能不起作用. Firebug向我显示"$(...).tabs不是函数".我不明白为什么,谁能告诉我哪里错了?
I have this code on two pages on my site, but at one page the function doesn't work. Firebug shows me " $(...).tabs is not a function ". I don't understand why, can anyone tell me what is wrong ?
这是有效的: http://www.invat-online.net/variante-rezolvate
这不起作用: http://www.invat-online.net/variante-explicate -limba-romana/varianta-01
这是代码:
<div id="tabss">
<ul>
<li><a href="#SubiectI">Subiect I</a></li>
<li><a href="#SubiectII">Subiect II</a></li>
<li><a href="#SubiectIII">Subiect III</a></li>
</ul>
<div id="SubiectI">content here</div>
<div id="SubiectII">content here</div>
<div id="SubiectIII">content here</div>
</div>
$(document).ready(function() {
$("#tabss").tabs();
});
推荐答案
您具有javascript文件的相对路径:
You have relative paths to javascript files:
javascript/jquery-ui-1.9.2.custom.min.js
将它们更改为绝对路径,因为您使用的是mod_rewrite
模块
change them to absolute paths because you're using mod_rewrite
module
/javascript/jquery-ui-1.9.2.custom.min.js
在第一个链接中,服务器正在查找目录
In first link the server is looking to the directory
http://www.invat-online.net/javascript/my_js_file.js
(存在)
但在第二个路径中将是
http://www.invat-online.net/variante-explicate-limba-romana/javascript/my_js_file.js
不存在
这篇关于$(...).tabs不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!