0

hoverIntent プラグインを機能させようとして、次のコードに注ぎ込んでいますが、役に立ちません。これは非常に基本的なものです (統合のアイデアがある場合は、お気軽に) - .hover は問題なく動作しますが、.hoverIntent = ダイスはありません。

基本的には、ユーザーがサムネイルの上にマウスを置いたときに大きな画像を変更したいだけですが、気まぐれを避けるために、起動する前に少し待ってください。

私のjQuery(更新され、ほとんど機能している)コード:

function makeShow1(){ 
    $("#some-div img").hide();
    $(".uno").show();
}
function makeShow2(){ 
    $("#some-div img").hide();
    $(".dos").show();
}
function makeShow3(){ 
    $("#some-div img").hide();
    $(".tres").show();
}
function makeShow4(){ 
    $("#some-div img").hide();
    $(".quattro").show();
}
function makeShow5(){ 
    $("#some-div img").hide();
    $(".cinco").show();
}

function passOut() {
    $.(this).stop();
}

$(document).ready(function () {

    $(".switch1").hoverIntent( {
        over: makeShow1,
        timeout: 500,
        interval: 300,
        out: passOut
    }); 

    $(".switch2").hoverIntent( {
        over: makeShow2,
        timeout: 500,
        interval: 300,
        out: passOut
    })

    $(".switch3").hoverIntent( {
        over: makeShow3,
        timeout: 500,
        interval: 300,
        out: passOut
    })

    $(".switch4").hoverIntent( {
        over: makeShow4,
        timeout: 500,
        interval: 300,
        out: passOut
    })

    $(".switch5").hoverIntent( {
        over: makeShow5,
        timeout: 500,
        interval: 300,
        out: passOut
    })

});

</script>
4

1 に答える 1

1

Try this example

First please check if hoverintent is loaded properly , you can do that through firebug and later you can verify if there are any errors not..in firebug conole

create two functions and try below code to check if it is working.

  $('.classname').hoverIntent({
        over: functionname2,
        timeout: 500,
        interval: 300,
        out: functionname1
    });
于 2010-12-03T18:09:57.570 に答える