My question is in the title :
How can I open a jquery fancybox (http://www.fancybox.net/) with a dblclick event ?
Thank you in advance for your response 🙂
edit :
I tried that but it doesn’t seems to work and I don’t really know why :
$("#id").dblclick(function(){
$("#id").fancybox({
...
});
$("#id").click(); //Trigger click to open the fancy because dblclick doesn't open the fancy
$("#id").unbind('click.fb'); //unbind the click fancybox event
});
The idea was to handle the fancy box when a dblclick is trigger, then trigger a click to open the fancy and then unbind the click.fb event to prevent the fancybox to open when a single click is trigger by the user.
Unfortunately, the unbind(‘click.fb’) doesn’t seems to work.
I’m not sure if I totally get the question, but try this:
No need to unbind anything.
EDIT: Here is a jsfiddle example.
http://jsfiddle.net/abqTD/3/