Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trigger fancybox with hover instead of click?

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 });    
});
like image 912
kylex Avatar asked Nov 12 '09 22:11

kylex


1 Answers

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

$("a.inline").fancybox().hover(function() {
    $(this).click();
});
like image 107
BStruthers Avatar answered Sep 19 '22 12:09

BStruthers