引入文件
--js
--jquery.js --jquery.simplemodal.js --gallery.js
--css
--gallery.css
dome格式
<html> <head></head> <body> <div id="container"> <span class="flickr_badge_image"><a href="img/photo/1.jpg"><img src="img/photo/1.jpg" title="gallery" width="75" height="75" /></a></span> <span class="flickr_badge_image"><a href="img/photo/2.jpg"><img src="img/photo/2.jpg" alt="gallery" title="gallery" width="75" height="75" /></a></span> <span class="flickr_badge_image"><a href="img/photo/3.jpg"><img src="img/photo/3.jpg" alt="gallery" title="gallery" width="75" height="75" /></a></span> <span class="flickr_badge_image"><a href="img/photo/4.jpg"><img src="img/photo/4.jpg" alt="gallery" title="gallery" width="75" height="75" /></a></span> <span class="flickr_badge_image"><a href="img/photo/5.jpg"><img src="img/photo/5.jpg" alt="gallery" title="gallery" width="75" height="75" /></a></span> </div> </body> </html>
在gallery.js文件修改 G.images = $('.flickr_badge_image a');