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

More then one image

Open adgrafik opened this issue 10 years ago • 1 comments

Thanks for this usefull extension! The most other don't support images. In this case I have adapted your script for my needs to support more then one image and think it can be useful:

search:

                if(options.image){
                    flakeMarkup = $(document.createElement("img"));
                    flakeMarkup[0].src = options.image;
                }

replace:

                if(options.image){
                    flakeMarkup = $(document.createElement("img"));
                    flakeMarkup[0].src = options.image;
                }else if(options.images){
                    flakeMarkup = $(document.createElement("img"));
                    flakeMarkup
                        .hide()
                        .attr('src', options.images[random(0, options.images.length - 1)])
                        .load(function() {  
                            $(this).fadeIn();  
                        });
                }

adgrafik avatar Nov 18 '14 15:11 adgrafik

Nice Ill modify this a bit and add it to the script thanks!

loktar00 avatar Nov 20 '14 04:11 loktar00