fancybox - How to get access to the initial blank white block and change its style when iframe preload is false? -


i using fancybox 3 project. here code

modal: true, iframe: {     css: {         width : '900px',         height: 'auto'     },     preload: false  } 

when fancybox starts show, first shows blank white block. white block stays half second or 1 or 2 seconds depnding on content. please see screenshot:

enter image description here

i access , customization. how can access it? how change style?

it depends on want customize. how, example, can make background transparent:

.fancybox-slide--iframe .fancybox-content, .fancybox-iframe {   background: transparent; } 

this how can append, example, loading icon:

$('[data-fancybox]').fancybox({   iframe : {     preload : false   },   afterload : function(instance, slide) {     slide.myspinner = $( instance.opts.spinnertpl ).appendto( slide.$slide )   },   aftershow : function(instance, slide) {     slide.myspinner.remove();   } }); 

demo - https://codepen.io/anon/pen/rzoryl


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -