FF4需要点击jquery为什么?

FF4需要点击jquery为什么?,jquery,firefox4,Jquery,Firefox4,我真的希望有人知道答案。为什么FF4需要点击2下才能启动树脂?另外,在玩游戏时,我注意到,如果我在第二次单击一个单独的图像,它会抓取应该应用于第一次单击/图像的调整大小设置。在FF3、safari、chrome、ie 7和8中都不错 $(document).ready(function(){ $("#slideShow a").click(function() { var imgTitle = $(this).children('img').attr('title'); // Find the

我真的希望有人知道答案。为什么FF4需要点击2下才能启动树脂?另外,在玩游戏时,我注意到,如果我在第二次单击一个单独的图像,它会抓取应该应用于第一次单击/图像的调整大小设置。在FF3、safari、chrome、ie 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 });
});

});

您应该尝试阻止默认操作


最好在回调中接受事件,并使用event.preventDefault@user520300:进行web搜索;在线上有大量示例。如果我将event.preventDefault放在函数开头,则什么也不会发生,如果我将其放在.resizeme1之前,则图像会更改,但不会调整大小
$(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;
    });
});