1

在我看来,我正在使用它来将我的图像显示为每条记录上的缩略图

<img src="<?php echo Router::url("**../files/images/small/**".$ad["Advertisement"]["advertisement_image"],false)?>

缩略图保存在小目录文件夹中,相同的大图像存储在大目录文件夹下。

你能告诉我如何获得与我使用 jQuery 工具提示进行大图像预览时相同缩略图的大图像,我该如何在上面的代码中给出的 alt 中实现这一点。

<img src="hills-thumb.jpg" alt="hills.jpg" rel="Hills Image" />

JS:

$(document).ready(function() {
    $("#thumbnail img").hover(function(e) {
        $("#large").css("top", (e.pageY + 5) + "px")
            .css("left", e.pageX + 5) + "px")
        .html("<img src=" + $(this).attr("alt") + " alt='Large Image' /><br/>" + $(this).attr("rel"))
        .fadeIn("slow");
    },
    function() {
        $("#large").fadeOut("fast");
    });
});

请帮忙

谢谢

4

1 回答 1

0

看看使用 jquery 工具提示进行图像预览的这个。

http://cssglobe.com/easyest-tooltip-and-image-preview-using-jquery/

于 2013-03-31T07:43:41.430 回答