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:
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(); } }); 
Comments
Post a Comment