SAMYANG/m/asset/js/sy.m.plugin.js
/**
         * Lazy loads image, video and audio elements.
         */
Lazy loads image, video and audio elements.
Lazy loads image video and audio elements .
function lazyLoad(destiny) {
            if (!options.lazyLoading) {
                return;
            }
            var panel = getSlideOrSection(destiny);
            var element;
            panel.find('img[data-src], img[data-srcset], source[data-src], source[data-srcset], video[data-src], audio[data-src], iframe[data-src]').each(function () {
                element = $(this);
                $.each(['src', 'srcset'], function (index, type) {
                    var attribute = element.attr('data-' + type);
                    if (typeof attribute !== 'undefined' && attribute) {
                        setSrc(element, type);
                    }
                });
                if (element.is('source')) {
                    var typeToPlay = element.closest('video').length ? 'video' : 'audio';
                    element.closest(typeToPlay).get(0).load();
                }
            });
        }
function lazyLoad ( destiny ) { if ( ! options . lazyLoading ) { return ; } var panel = getSlideOrSection ( destiny ) ; var element ; panel . find ( 'img[data-src], img[data-srcset], source[data-src], source[data-srcset], video[data-src], audio[data-src], iframe[data-src]' ) . each ( function ( ) { element = $ ( this ) ; $ . each ( [ 'src' , 'srcset' ] , function ( index , type ) { var attribute = element . attr ( 'data-' + type ) ; if ( typeof attribute !== 'undefined' && attribute ) { setSrc ( element , type ) ; } } ) ; if ( element . is ( 'source' ) ) { var typeToPlay = element . closest ( 'video' ) . length ? 'video' : 'audio' ; element . closest ( typeToPlay ) . get ( 0 ) . load ( ) ; } } ) ; }
Lazy loads image, video and audio elements.
Lazy loads image video and audio elements .