[英]Having trouble putting a lightbox inside an accordion in .html
I'm currently trying to place this lightbox into this accordion 我目前正在尝试将此灯箱放入此手风琴中
I've had them both working seperately okay, but I don't seem to be able to get them to work on the same page (whether or not one is inside the other) 我已经让他们两个都可以单独工作,但是我似乎无法让他们在同一页面上工作(无论一个人是否在另一个人内)
I've noticed that I've ended up with: 我注意到我最终得到了:
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<script src="js/jquery-1.10.2.min.js"></script>
<script src="js/lightbox-2.6.min.js"></script>
In my header, which might be one duplicating a more recent version of the other etc and was wondering if that could be a problem? 在我的标头中,这可能是一个副本,是另一个副本的较新版本,却想知道这是否可能是个问题?
In the html I have: 在html中,我有:
<div id="accordion" style="width:1000px; border: 1px solid black">
<h4> Section 1 </h4>
<div>
<p> Text </p>
<a href="images/image.jpg" data-lightbox="images"><img src="images/image.jpg"/></a>
</div>
</div>
Is there something I'm trying to do incorrectly, or is this something that just won't work in this way? 是否有我尝试做错的事情,还是这种方式行不通?
Thanks in advance for any help! 在此先感谢您的帮助!
As I thought above, I had used the two different versions of JQuery and loading them both was causing a little bit of confusion. 如上所述,我使用了两个不同的JQuery版本,加载它们都引起了一些混乱。
To solve this I removed one of the JQuery sources: 为了解决这个问题,我删除了一个JQuery源:
<script src="js/jquery-1.9.1.js"></script>
<script src="js/jquery-ui-1.10.3.js"></script>
<script src="js/lightbox-2.6.min.js"></script>
(I have also changed the sources to be local, rather than referencing a website) (我也将来源更改为本地来源,而不是引用网站)
Though I didn't remove the oldest, this appeared to work better for the versions of things I was trying to load. 尽管我没有删除最旧的,但是对于我尝试加载的版本来说,这似乎更好。 Hope this helps someone else at some point too. 希望这也会在某些时候对别人有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.