开发者

Trigger fancybox with hover instead of click?

开发者 https://www.devze.com 2022-12-11 12:27 出处:网络
I\'m trying to get fancybox to trigger when the mouse is hovered over a link. Have had no luck though... any suggestions?

I'm trying to get fancybox to trigger when the mouse is hovered over a link.

Have had no luck though... any suggestions?

$(document).ready(function() { 
/* This is basic - uses default se开发者_Python百科ttings */     
    $("a.inline").fancybox({ 'hideOnContentClick': false });    
});


One way would be to fire the click when the hover event is triggered.

$("a.inline").fancybox().hover(function() {
    $(this).click();
});


 $("#div a").fancybox(
            {
                'width': '75%',
                'height': '50%',
                'autoScale': false,
                'transitionIn': 'elastic',
                'transitionOut': 'elastic',
                'type': 'iframe'
            }).hover(function () {
                $(this).click();
            });
0

精彩评论

暂无评论...
验证码 换一张
取 消