Reputation: 587
I'm using the latest version of jQuery and Fancybox both of the official pages, but for strange reason does not work on popup when inputs inside.
That is not working the blur on inputs, my code is:
$("#popup").fancybox({
closeClick : false,
openEffect : 'none',
closeEffect : 'none',
helpers : {
overlay : {
closeClick: false,
}
}
}).trigger("click");
What am I doing wrong?
UPDATE:
Link example: http://jsfiddle.net/YkH5G/
Upvotes: 1
Views: 699
Reputation: 587
Improved solution according to the author of the plugin
$(document).ready(function() {
$.fancybox({
content: $("#popup"),
closeClick : false,
openEffect : 'none',
closeEffect : 'none',
helpers : {
overlay : {
closeClick: false,
}
}
});
});
Link: http://jsfiddle.net/YkH5G/1/
By author plugin: https://github.com/fancyapps/fancyBox/issues/410
Upvotes: 1
Reputation: 25489
For whatever reason, fancybox is loading on every click of popup, rather than onload. Because the content of popup is in the fancybox, every time you click in the fancybox you're clicking on popup and therefore loading fancybox again.
What you need to do is create a link with an href of popup and use that to trigger fancybox. Here's an example: http://jsfiddle.net/YkH5G/2/
Upvotes: 1