我正在使用Imagelightbox和Bootstrap。我有一个折叠导航栏在我的手机查看,当下面的JavaScript存在的页面上,拨动按钮不起作用:自定义Javascript存在时Bootstrap导航栏折叠不起作用
$(function() {
$('a[data-imagelightbox="ufo"]').imageLightbox({button: true, quitOnDocClick: true, navigation: false, arrows: true, overlay: true, caption: true});
$('a[data-imagelightbox="dreifeld"]').imageLightbox({button: true, quitOnDocClick: true, navigation: false, arrows: true, overlay: true, caption: true});
$('a[data-imagelightbox="delle"]').imageLightbox({button: true, quitOnDocClick: true, navigation: false, arrows: true, overlay: true, caption: true});
});
我的HTML看起来像这样:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link href="css/custom.css" rel="stylesheet" type="text/css">
<link href="css/imagelightbox.css" rel="stylesheet" type="text/css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="js/imagelightbox.min.js"></script>
</head>
我不假设我的导航栏有什么问题,因为它正在工作,当上面的JavaScript不存在时。
有人有一个想法是什么问题?
你可以在jsfiddle上重新创建相同的问题吗? – ZimSystem
尝试test.spannmacher.com – mspann
切换按钮在那里工作。尝试清除缓存。 – user31782