0

我真的希望有人会知道这个问题的答案。为什么 FF4 需要点击 2 次才能触发 resizeme?另外,在玩的时候,我注意到如果我在第二次单击时单击单独的图像,它会抓取应该在第一次单击/图像上应用的调整大小设置。它在 FF3、safari、chrome、即 7 和 8 中肯定没问题。

$(document).ready(function(){

$("#slideShow a").click(function() {
var imgTitle = $(this).children('img').attr('title'); // Find the image title
$("#thecap").html(' ' + imgTitle + ' ');
$("#lgImage").attr('src', $(this).children('img').attr('rel'));
$( ".resizeme1" ).aeImageResize({ height: 372 });
});

});
4

1 回答 1

0

您应该尝试阻止默认操作

$(document).ready(function(){
    $("#slideShow a").click(function()
    {
        var $img = $(this).children('img'),
            imgTitle = $img.attr('title'); // Find the image title

        $('#thecap').
            text(' ' + imgTitle + ' ');

        $('#lgImage').
            attr('src', $img.attr('rel'));

        $('.resizeme1').
            aeImageResize({ 
                height: 372 
            });

        return false;
    });
});
于 2011-04-07T22:19:28.973 回答