我的 jquery 库出现错误。当我在底部附近结束脚本时,错误发生在附近,我添加了 java for 循环,因为图片命名为 0-170:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<!-- load Galleria -->
<script src="galleria-1.2.7.min.js"></script>
</head>
<body>
<div class="content">
<h1>Galleria Classic Theme</h1>
<p>Demonstrating a basic gallery example.</p>
<!-- Adding gallery images. We use resized thumbnails here for better performance, but it’s not necessary -->
<script src="jquery.js"></script>
<script>
$(document).ready
var galleria = $('#galleria')
for(var i=0;i<170;i++){
var imgName = "images/"+i+".JPG"
galleria.append('<a href="'+imgName+'"><img src="'+imgName+'"></a>')
{
// Load the classic theme
Galleria.loadTheme('galleria.classic.min.js');
// Initialize Galleria
Galleria.run('#galleria');
</script>
<script src="jquery.js"></script>
</body>
</html>