Rin*_*cke 6 jquery jquery-ui tooltip jquery-tooltip
我正在使用此工具提示:http://flowplayer.org/tools/demos/tooltip/index.html
我的html文件中有以下几行:
<script src="/javascripts/home.js" type="text/javascript"></script>
<script src="http://cdn.jquerytools.org/1.2.6/jquery.tools.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/scripts/jquery.min.js"></script>
<div id="boo">
<img src="image1.jpg" title="this thing is a tool"/>
<img src="image2.jpg" title="this thing is also tool"/>
</div>
Run Code Online (Sandbox Code Playgroud)
我的home.js文件中有以下行:
$("#boo img[title]").tooltip();
Run Code Online (Sandbox Code Playgroud)
我的css文件中有以下行:
.tooltip {
display:none;
background:transparent url(/tools/img/tooltip/black_arrow.png);
font-size:12px;
height:70px;
width:160px;
padding:25px;
color:#fff;
}
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
Uncaught TypeError: Object [object Object] has no method 'tooltip'
Run Code Online (Sandbox Code Playgroud)
我的智慧结束了.我觉得我已经完全按照网站上的例子,但不知道发生了什么.
Gre*_*g B 11
你应该重新排序你的js文件:
<script type="text/javascript" src="/scripts/jquery.min.js"></script>
<script src="http://cdn.jquerytools.org/1.2.6/jquery.tools.min.js" type="text/javascript"></script>
<script src="/javascripts/home.js" type="text/javascript"></script>
Run Code Online (Sandbox Code Playgroud)
对于遇到此问题的其他人,请多说一点:
脚本按照它们被调用的顺序加载,因此您希望首先加载jQuery,然后加载任何插件,然后加载自定义代码.
| 归档时间: |
|
| 查看次数: |
17214 次 |
| 最近记录: |