gpt4 book ai didi

javascript - Litebox 插件不起作用

转载 作者:行者123 更新时间:2023-12-03 12:17:00 25 4
gpt4 key购买 nike

我一直在尝试使用 litebox 插件创建一个画廊来实现弹出效果。该网站是一个具有单个母版页的 aspx 网站。母版页中的链接:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js" type="text/javascript"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js" type="text/javascript"></script>
<script src="assets/javascript/jquery.slides.js" type="text/javascript"></script>
<script src="assets/javascript/jquery.slides.min.js" type="text/javascript"></script>

<!--Litebox start-->
<link href="assets/litebox/css/litebox.css" rel="stylesheet" type="text/css" />
<link href="assets/litebox/css/litebox.css" rel="stylesheet" type="text/css" />
<link href="assets/litebox/css/normalize.css" rel="stylesheet" type="text/css" />
<script src="assets/litebox/js/smoothscroll.js" type="text/javascript"></script>
<script src="assets/litebox/js/images-loaded.min.js" type="text/javascript"></script>
<script src="assets/litebox/js/litebox.js" type="text/javascript"></script>
<script src="assets/litebox/js/backbone.js" type="text/javascript"></script>

弹出图像:

<p>
<a href="assets/images/portfolio/customizingQuestions.jpg" target="_self" class="inline-block litebox" data-litebox-group="group-1" ><img src="assets/images/portfolio/customizingQuestionsThumb.jpg" class="inline-block" /></a>
<a href="assets/images/portfolio/differentQuestionTypes.jpg" target="_self" class="inline-block litebox" data-litebox-group="group-1"><img src="assets/images/portfolio/differentQuestionTypesThumb.jpg" class="inline-block" /></a>
<a href="assets/images/portfolio/finalMoments.jpg" target="_self" class="inline-block litebox" data-litebox-group="group-1"><img src="assets/images/portfolio/finalMomentsThumb.jpg" class="inline-block" /></a>
<a href="assets/images/portfolio/pressingAButton.jpg" target="_self" class="inline-block litebox" data-litebox-group="group-1"><img src="assets/images/portfolio/pressingAButtonThumb.jpg" class="inline-block" /></a>
<a href="assets/images/portfolio/welcomeScreen.jpg" target="_self" class="inline-block litebox" data-litebox-group="group-1"><img src="assets/images/portfolio/welcomeScreenThumb.jpg" class="inline-block" /></a>
</p>

最佳答案

尝试

HTML

<div id="gallery">
<ul>
<li><a href="photos/image1.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery').lightBox();">
<img src="photos/thumb_image1.jpg" width="72" height="72" alt="" />
</a></li>
<li><a href="photos/image2.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery a').lightBox();">
<img src="photos/thumb_image2.jpg" width="72" height="72" alt="" />
</a></li>
<li><a href="photos/image3.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery a').lightBox();">
<img src="photos/thumb_image3.jpg" width="72" height="72" alt="" />
</a></li>
<li><a href="photos/image4.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery a').lightBox();">
<img src="photos/thumb_image4.jpg" width="72" height="72" alt="" />
</a></li>
<li><a href="photos/image5.jpg" title="Utilize a flexibilidade dos seletores da jQuery e crie um grupo de imagens como desejar. $('#gallery a').lightBox();">
<img src="photos/thumb_image5.jpg" width="72" height="72" alt="" />
</a></li>
</ul>
</div>

Javascript

<script type="text/javascript">
$(function () {
$('#gallery a').lightBox();
});
</script>

关于javascript - Litebox 插件不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24637393/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com