自定义 jquery 画廊
我正在创建一个模板。除了 jquery 图像库之外,所有 xhtml/css 工作都已完成。周围有太多的jquery画廊,我不知道如何根据情况自定义它们
这是一个三列模板..第一列有导航。第二列将从第三列的缩略图中选择图像。第三列中还有用于旋转缩略图的向上/向下按钮。单击缩略图应加载到第二列的图像 div 中。
我需要提供更多信息吗?
I am creating a template. All xhtml/css work is done but a jquery image gallery. There are too many jquery galleries around and i do not know how to customize them according to situation
This is a three column template..First column has navigation. second column will have image selected from thumbnails of 3rd column. Also there are up/down buttons in 3rd column that rotate thumbnails. ON clicking a thumbnail image should load in 2nd column's image div.
Do i have to provide any more info?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
由于您实际上没有提出问题,所以我假设您是在问如何开始。您还没有给出 HTML 结构,所以我也必须假设这一点。
HTML 结构
首先创建一个 jQuery 插件:
这可以确保您的代码完全可重用,并且如果您将来想将其与其他框架一起使用,也不会导致命名冲突。接下来,您要向每个缩略图添加单击事件,以使其修改主图像的 SRC:
最后调用您的函数:
此代码应提供基本功能。我将让您致力于使缩略图可滚动,如果您真的愿意的话,可以在图像之间进行淡入淡出(提示:您需要两个 img 标签,使用 CSS 将它们放在彼此之上,然后
.animate()
它们之间淡出的不透明度)。希望这能让你继续前进。Since you haven't actually asked a question, I'm going to assume you're asking how to get started. You also haven't given your HTML structure, so I'm going to have to assume that too.
HTML structure
Start off by creating a jQuery plugin:
This ensures that your code will be completely re-usable and won't cause naming clashes if you want to use it with another framework in future. Next you want to add a click event to each thumbnail to make it modify the SRC of the main image:
Finally call your function:
This code should provide the basic functionality. I'll leave you to work on making the thumbnails scrollable, and if you really feel up to it, making a fade between images (hint: you need two img tags, with CSS to lay them on top of each other, then
.animate()
the opacity to fade between them). Hopefully this should get you going though.Galleriffic 是您的解决方案
http://www.twospy.com/galleriffic/index.html
它非常可定制且易于集成。
Galleriffic Is Your Solution
http://www.twospy.com/galleriffic/index.html
Its very Customizable and Easy to Integrate.