JQuery-Snowfall icon indicating copy to clipboard operation
JQuery-Snowfall copied to clipboard

Only show image base snowflakes after the image has fully loaded

Open MadeInSwitzerland opened this issue 6 years ago • 1 comments

If the loading of the snowflake image takes a long time, empty placeholders can be seen, what looks very ugly! Please insert following 2 lines of code after line 140 (jQuery variant): $(flakeMarkup).css('display','none'); // Only show the snowflake after the image has been loaded flakeMarkup.onload = function () {$(flakeMarkup).css('display','block');};

MadeInSwitzerland avatar Nov 26 '19 10:11 MadeInSwitzerland

Alternatively you could just have the plugin initialize after the image loads, load the image via JS and listen for the load even of the image.

loktar00 avatar Nov 26 '19 21:11 loktar00