简体   繁体   English

将图库插件与图像放大功能插件集成在一起

[英]Integrating an image gallery plugin with an image zoom in function plugin

I know this site works on a points system, so i'll like to stress i'm a developer just starting out and i'm new to this site. 我知道这个网站可以在点数系统上工作,所以我想强调一下,我只是一个刚起步的开发人员,我是这个网站的新手。 Please be nice!!! 请友好一点!!!

I have a slight problem with developing what i'm trying to achieve, i believe this maybe, predominately a HTML issue. 我在开发要达到的目标时遇到了一个小问题,我相信这可能主要是HTML问题。 I have downloaded two plugin's one being an image zoom function and the other is an image gallery with thumbnails. 我已经下载了两个插件,一个是图像缩放功能,另一个是带有缩略图的图像库。

The challenge i'm facing is integrating the two functions together, as both functions require an i can't find a "clean" way to merge these two pieces of script together. 我面临的挑战是将两个功能集成在一起,因为这两个功能都需要一种找不到将这两个脚本合并在一起的“干净”方法。 Is there anyone out there that knows how i can merge these two script together? 有没有人知道我如何将这两个脚本合并在一起?

Image zoom HTML 图片缩放HTML

        <a class="zoom" href="css/product-gallery/item1.jpg"><img class="product-gallery" src="css/product-gallery/item1.jpg" alt="img1"></a>

Image gallery with Thumbnails HTML 带有缩略图HTML的图片库

<a class="thumb" href="css/product-gallery/item1.jpg" title="Title #0"><img src="css/thumbnails/thumb2.jpg"/></a>

Click here for Image zoom code 单击此处获取图像缩放代码

PS "It's not a lightbox effect i'm after, it's more an eCom image zoom function i'm after" PS“不是我想要的灯箱效果,而是我想要的eCom图像缩放功能”

Having them both (lightbox zoom + on hover zoom) doesn't really make much sense, you should choose one and go with it. 两者都没有(灯箱缩放+悬停缩放)并没有多大意义,您应该选择一个并随身携带。 Lightbox is very easy to use and will do exactly what you want so i'd go with that. 灯箱非常易于使用,并且可以完全满足您的需求,所以我会这么做。 Quick little example: - 简单的小例子:-

<script type="text/javascript">
$(function() {
    $('#imageGallery a').lightBox();
});
</script>

<div id="imageGallery">
   <a href="image-you-want-to-zoom"><img src="thumbnail-image" /></a>
</div>

If a 'lightbox-like' function is not what you're after, then try something like this: 如果您不希望使用类似“灯箱”的功能,请尝试以下操作:

http://www.jacklmoore.com/zoom http://www.jacklmoore.com/zoom

And for some quick mock-up code of it in action: 并为其提供一些快速的模拟代码:

http://jsfiddle.net/jquerybyexample/cvjsN/ http://jsfiddle.net/jquerybyexample/cvjsN/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM