Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/86.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript jQuery图像库(需要如何使大图像可点击)_Javascript_Jquery_Html_Xhtml - Fatal编程技术网

Javascript jQuery图像库(需要如何使大图像可点击)

Javascript jQuery图像库(需要如何使大图像可点击),javascript,jquery,html,xhtml,Javascript,Jquery,Html,Xhtml,我正在使用“在JQUERY的4行中创建图像库”(下面的链接),效果很好 但是我喜欢让大图像可以点击(不仅仅是拇指),这样当我点击显示为大图像的图像时,另一个更大版本的图像会在一个新窗口中打开 任何想法都非常感谢。谢谢。您好,您可以尝试使用Pretty photo插件在灯箱中显示图库。这可能有助于您您可以将大图像包装在锚元素中: <div id="panel"> <a href="images/image_01_largest.jpg" target="_blank"&

我正在使用“在JQUERY的4行中创建图像库”(下面的链接),效果很好

但是我喜欢让大图像可以点击(不仅仅是拇指),这样当我点击显示为大图像的图像时,另一个更大版本的图像会在一个新窗口中打开


任何想法都非常感谢。谢谢。

您好,您可以尝试使用Pretty photo插件在灯箱中显示图库。这可能有助于您

您可以将大图像包装在锚元素中:

<div id="panel">
    <a href="images/image_01_largest.jpg" target="_blank">
        <img id="largeImage" src="images/image_01_large.jpg" />
    </a>
    <div id="description">First image description</div>
</div>

感谢您的快速回复和优雅的解决方案,工作起来很有魅力:)谢谢您的提示,整洁的小jquery lightbox!
$('#thumbs img').click(function(){
    $('#largeImage').attr('src', $(this).attr('src').replace('thumb', 'large'));
    $('#largeImage').parent().attr('href', $(this).attr('src').replace('thumb', 'largest'));
    $('#description').html($(this).attr('alt'));
});