最好的jQuery“单击缩略图并更改主图像"模块? [英] What's the best jQuery "click a thumbnail and change the main image" module?
问题描述
这就是我所拥有的(如果有所不同,它们都是动态生成的):
- 图像列表
- 每张图片的标题
- 每张图片的缩略图
页面应加载一张完整尺寸的图像和所有缩略图.当用户单击缩略图时,原尺寸图像将显示带有标题的新图像.如果他们单击另一个缩略图,则图片(和标题)会再次更改.
这不是很复杂.几个月前,我一起破解了一个解决方案,但是我需要再做一次,我正在查看这个糟糕的代码,并认为必须有更好的方法(并且知道jQuery,其他人已经做到了,并且已经做了好吧).
有什么想法吗?链接?
谢谢!
这是一个看起来非常漂亮的用jQuery写的:画廊 >
Here's what I have (all generated dynamically, if that makes a difference) :
- A list of images
- A caption for each image
- A thumbnail for each image
The page should load with one full-size image and all the thumbnails. When a user clicks a thumbnail, the full-size image shows that new image with its caption. If they click another thumbnail, the picture (and caption) change again.
It's not very complex. I hacked together a solution a few months ago, but I need to do it again and I'm looking at this crappy code and thinking that there has to be a better way (and knowing jQuery, someone else has already done it, and done it well).
Thoughts? Links?
Thanks!
Here's one that looks pretty nice and is written in jQuery: Photo Slider
And here is another which I like a bit better: Galleria
这篇关于最好的jQuery“单击缩略图并更改主图像"模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!