Opening overlay manually
He,
after closing the site is jumping back to the top.
Why do you set the body to overflow hidden?
fancybox.showLoading() is not showing the overlay. We need this for eCommerce add to Cart function.
We already tried to put the request to beforeLoad function but that doesn't work.
Thx
If you open http://fancyapps.com/fancybox/#examples - is the site jumping to the top? Are you experiencing any "closing bug"? Yes/No? If no, then, obviously, there is something wrong with your site.
It is not currently possible to manually open/close overlay.
it's my fault. how much work will it be to open the overlay with the showLoading function? We can donat the money for that feature.
I`ll give it a try.
Btw, are you suing the latest version? fancyBox recently started to display overlay on load.
hey thx I see you added in the helpers onReady function, can you explain how to use this? I have to show the the overlay before calling the showLoading API function
It is now (since v2.1.2) possible to open and close overlay manually -
// Open using default options
$.fancybox.helpers.overlay.open();
// Pass custom options
$.fancybox.helpers.overlay.open({closeClick : false});
// Close
$.fancybox.helpers.overlay.close();
Hi !
I'm using fancybox v2.1.5 and would like to use the fancybox overlay screen while loading items in ajax and therefor trigger it manually.
I was glad to find that someone else asked for the same thing and that this issue was fixed, but it seems that in v2.1.5, the overlay doesn't shows up anymore this way. I've tried the code above, and the showLoading function (but this only display the animated icon and not the overlay)
Am I doing something wrong or is there another way to trigger (and hide) both overlay and icon ?
Thx in advance (and a really great thx for fancybox script !!)
Open/close overlay:
$.fancybox.helpers.overlay.open();
$.fancybox.helpers.overlay.close();
Show/hide loading icon:
$.fancybox.showLoading();
$.fancybox.hideLoading();
Hi !
Thx for your fast answer.
That's the code I've used, but overlay doesn't appears.
I've check on demo site and found differences between the fancybox.jquery.js scripts available in the 2.1.5 package from github (v1) and the one available on jsfiddle/fancyapps.com (v2).
$.fancybox.helpers.overlay.open() only works with v2.
Kind regards
Edit :
Difference is in here :
V1 : this.overlay = $('
').appendTo( F.coming ? F.coming.parent : opts.parent );V2 parent = F.coming ? F.coming.parent : opts.parent; this.overlay = $('
').appendTo( parent && parent.lenth ? parent : 'body' );There is no more test to check if " opts.parent " exists and switch to body tag if it doesn't :)
I was experiencing the same issue. If you alert(F.coming ? F.coming.parent : opts.parent ) you will see that there is nothing to appendTo. So define a parent.
$.fancybox.helpers.overlay.open({parent: 'body'});
For me, $.fancybox.helpers.overlay.open({parent: 'body'}); doesn't work, but $.fancybox.helpers.overlay.open({parent: $('body')}); yes
According to the Jquery appendTo() specification, both ({parent: 'body'} and $('body')) should work.
Oh yes sorry, just checked my previous code and I had another mistake!
$.fancybox.helpers.overlay.open({parent: $('body')}); worked for me. Thanks Guys
.fancybox.helpers.overlay.open({parent: $('body')}); Yes, it works very well. Thanks.
.fancybox.helpers.overlay.open({parent: $('body')}); Yes, it works very well. +1 I am looking for same