This will post more answers. Unfortunately, I cannot find a βrealβ solution, but other people are replacing CSS overlay CSS (# fancybox-overlay) to enable spinner. Then, when the iframe'd page ultimately loads it on top of the counter.
EDIT:
I refused to use fancybox to process the uploaded image and decided to share my solution. I added an absolutely positioned gif loading to my page, showing it just before the fancybox call, and I can capture the event loaded by the iframe using jQuery to hide the counter, for example:
$( "#progressIcon" ).show(); $.fancybox.open( { type: "iframe", minWidth: 990, minHeight: 690, href: URL, title: "Basket" } ); $( "iframe" ).load( function () { $( "#progressIcon" ).hide(); } );
If you don't call fancybox manually like me, I suppose you could just attach this code through the click event, i.e.
$('.fancybox').fancybox(); $('.fancybox').click( );
I also noticed that while playing in the fancybox (v2.0.6) source, it looks like fancybox uses the load event to show / hide the loading animation if autoSize is used with iFrame, although I have not tested the theory.
if (type === 'iframe' && current.autoSize) { F.showLoading(); F._setDimension(); F.inner.css('overflow', current.scrolling); content.bind({ onCancel : function() { $(this).unbind(); F._afterZoomOut(); }, load : function() { F.hideLoading(); try { if (this.contentWindow.document.location) { F.current.height = $(this).contents().find('body').height(); } } catch (e) { F.current.autoSize = false; } F[ F.isOpen ? '_afterZoomIn' : '_beforeShow'](); } }).appendTo(F.inner); } else { F.inner.append(content); F._beforeShow(); }
Dead.Rabit
source share