我正在尝试让 slicebox 在测试页面中工作。从文档来看,我似乎需要使用 slicebox css 文件并将 jquery 脚本与 slicebox.js 链接起来。从那里开始,我认为它就像在脚本中调用函数一样简单,就像在 "$('#sb-slider').slicebox(); 但图片甚至没有出现。
<!DOCTYPE html>
<html lang="en">
<head>
<title>Slicebox Test</title>
<link rel="stylesheet" type="text/css" href="css/slicebox.css" />
</head>
<body>
<ul id="sb-slider" class="sb-slider">
<li>
<a href="http://www.flickr.com/photos/strupler/2969141180" target="_blank"><img src="images/1.jpg" alt="image1"/></a>
</li>
<li>
<a href="http://www.flickr.com/photos/strupler/2968268187" target="_blank"><img src="images/2.jpg" alt="image2"/></a>
</li>
<li>
<a href="http://www.flickr.com/photos/strupler/2968114825" target="_blank"><img src="images/3.jpg" alt="image1"/></a>
</li>
<li>
<a href="http://www.flickr.com/photos/strupler/2968122059" target="_blank"><img src="images/4.jpg" alt="image1"/></a>
</li>
<li>
<a href="http://www.flickr.com/photos/strupler/2969119944" target="_blank"><img src="images/5.jpg" alt="image1"/></a>
</li>
<li>
<a href="http://www.flickr.com/photos/strupler/2968126177" target="_blank"><img src="images/6.jpg" alt="image1"/></a>
</li>
<li>
<a href="http://www.flickr.com/photos/strupler/2968945158" target="_blank"><img src="images/7.jpg" alt="image1"/></a>
</li>
</ul>
<div>
<a href="#">Next</a>
<a href="#">Previous</a>
</div>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.slicebox.js"></script>
<script type="text/javascript">
$("#sb-slider").slicebox();
</script>
</body>
</html>