Question

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 settings */     
    $("a.inline").fancybox({ 'hideOnContentClick': false });    
});
Was it helpful?

Solution

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

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

OTHER TIPS

 $("#div a").fancybox(
            {
                'width': '75%',
                'height': '50%',
                'autoScale': false,
                'transitionIn': 'elastic',
                'transitionOut': 'elastic',
                'type': 'iframe'
            }).hover(function () {
                $(this).click();
            });
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top