I have fancybox (jquery.fancybox-1.3.1.js
) in my webpage to show some information from a database.
I am try to close this fancybox popup from the 'escape' button click event.
But there is already 'enableEscapeButton' option to close popup in escape click event. but it's not working.
Please see my code below.
parent.$.fancybox(
$("#divEventdetails").html(),
{
modal: false,
hideOnOverlayClick: false,
autoScale: false,
autoDimensions: false,
'class': 'sv_calendarpopup',
'showCloseButton': true,
'transitionIn': 'fade',
'transitionOut': 'fade',
'enableEscapeButton': 'true'
});
You're passing a string , instead of a Boolean:
'enableEscapeButton': 'true' // 'true' is a string
Try
'enableEscapeButton': true