FancyBox 根本不工作
我在运行 fancybox 时遇到问题 - 我也在运行其他一些 jquery。以下是正在运行的脚本。
<!-- latest jQuery direct from google's CDN -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
</script>
<!-- the mousewheel plugin - optional to provide mousewheel support -->
<script type="text/javascript" src="../js/jquery.mousewheel.js"></script>
<!-- the jScrollPane script -->
<script type="text/javascript" src="../js/jquery.jscrollpane.min.js"></script>
<!-- EasySlider -->
<script type="text/javascript" src="../js/easySlider.js"></script>
<!-- fancybox -->
<script type="text/javascript" src="../js/fancybox/jquery.fancybox-1.3.2.pack.js"></script>
<!-- fancybox transitions -->
<script type="text/javascript" src="../js/fancybox/jquery.easing-1.3.pack.js"></script>
<script>
$(function()
{
$('.scroll-pane').jScrollPane();
});
</script>
<script>
$(document).ready(function(){
$("#slider").easySlider({
auto: true,
continuous: true
});
});
</script>
<script>
$(document).ready(function(){
$("a#fancy").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'overlayShow' : false
});
});
</script>
这是当前(未)受到影响的 div。
<div class="bodytext" style="position:absolute; left:457px; top:911px; width:468px; height:23px;">
<a id="a#fancy" href="../katie/studies/1_explorer/explorer_01.png">1</a>
•
<a id="a#fancy" href="../katie/studies/1_explorer/explorer_02.jpg">2</a>
•
<a id="a#fancy" href="../katie/studies/1_explorer/explorer_03.jpg">3</a>
</div>
不确定发生了什么,因为所有其他脚本都运行良好。为任何帮助干杯。这可能是我忽略的简单事情:]
I'm having issues getting fancybox to run - I am running a few other jquery's too. Below are the scripts that are running.
<!-- latest jQuery direct from google's CDN -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
</script>
<!-- the mousewheel plugin - optional to provide mousewheel support -->
<script type="text/javascript" src="../js/jquery.mousewheel.js"></script>
<!-- the jScrollPane script -->
<script type="text/javascript" src="../js/jquery.jscrollpane.min.js"></script>
<!-- EasySlider -->
<script type="text/javascript" src="../js/easySlider.js"></script>
<!-- fancybox -->
<script type="text/javascript" src="../js/fancybox/jquery.fancybox-1.3.2.pack.js"></script>
<!-- fancybox transitions -->
<script type="text/javascript" src="../js/fancybox/jquery.easing-1.3.pack.js"></script>
<script>
$(function()
{
$('.scroll-pane').jScrollPane();
});
</script>
<script>
$(document).ready(function(){
$("#slider").easySlider({
auto: true,
continuous: true
});
});
</script>
<script>
$(document).ready(function(){
$("a#fancy").fancybox({
'transitionIn' : 'elastic',
'transitionOut' : 'elastic',
'speedIn' : 600,
'speedOut' : 200,
'overlayShow' : false
});
});
</script>
And this is the div that's currently (not) being affected.
<div class="bodytext" style="position:absolute; left:457px; top:911px; width:468px; height:23px;">
<a id="a#fancy" href="../katie/studies/1_explorer/explorer_01.png">1</a>
•
<a id="a#fancy" href="../katie/studies/1_explorer/explorer_02.jpg">2</a>
•
<a id="a#fancy" href="../katie/studies/1_explorer/explorer_03.jpg">3</a>
</div>
Not sure what's going on as all the other scripts are running fine. Cheers for any help. It's probably something simple that I'm overlooking :]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是指 ID 为“fancy”的元素,而不是“a#fancy”。因此,您可以更改“a”标签的 ID 或使用“a”标签类而不是 id,如下所示。
和 HTML
this is refering to a element with ID 'fancy', not 'a#fancy'. So you could change the ID of your 'a' tag or use the 'a' tag class instead of the id as shown below.
and html
a 指的是 html 标签,其中 fancy 是您尝试选择的元素的实际标签。
a refers to the html tag where fancy is the actual tag of the element that you are trying to select.