私はこのスクリプトを持っています:
$(document).ready(function(){
$('.infoLink').hover(function(){
$('.shoutBox').hide();
$(".shoutBox"+$(this).attr("id")+"").toggle();
});
$('.closeLink').click(function(){
$(this).closest(".shoutBox").toggle();
});
});
訪問者がポップアップ リンクにカーソルを合わせるのをやめたときにポップアップが消えるように、少し追加する必要があります。
ポップアップ リンクは小さな「i」ボタンです。
<a href="javascript:void(0);" class="infoLink rollover" id="box1"><img width="12" height="11" border="0" src="../path/to/randomimage.png" alt="" title="" /></a>
追加しようとしました:
$('.infolink').onMouseOut(function(close){
$('.shoutBox').close();
$(".shoutBox"+$(this).attr("id")+"").toggle();
});
そのようなもの...しかし、おわかりのように...これはうまくいきませんでした...
私を助けることができる人はいますか?