9

当鼠标悬停在链接上时,我试图让 fancybox 触发。

虽然没有运气......有什么建议吗?

$(document).ready(function() { 
/* This is basic - uses default settings */     
    $("a.inline").fancybox({ 'hideOnContentClick': false });    
});
4

2 回答 2

25

一种方法是在触发悬停事件时触发单击。

$("a.inline").fancybox().hover(function() {
    $(this).click();
});
于 2009-11-12T22:48:42.040 回答
2
 $("#div a").fancybox(
            {
                'width': '75%',
                'height': '50%',
                'autoScale': false,
                'transitionIn': 'elastic',
                'transitionOut': 'elastic',
                'type': 'iframe'
            }).hover(function () {
                $(this).click();
            });
于 2011-09-18T22:01:03.783 回答