PATH:
home
/
lab2454c
/
mact34.com
/
wp-content
/
plugins
/
bdthemes-element-pack
/
assets
/
vendor
/
js
/* eslint no-unused-vars: ["error", { "vars": "local", "varsIgnorePattern": "player" }] */ jQuery( function( $ ) { var player; var $window = jQuery( window ); var $featuredMedia = jQuery( "#featured-media" ); // Container. var $featuredVideo = jQuery( "#featured-video" ); // Actual Video. var top = $featuredMedia.offset().top; var offset = Math.floor( top + ( $featuredMedia.outerHeight() / 2 ) ); window.onYouTubeIframeAPIReady = function() { player = new YT.Player( 'featured-video', { events: { "onStateChange": onPlayerStateChange } } ); }; /** * Run when the Youtube video state (play, pause, etc.) is changed. * * @param {Object} event The Youtube Object Event. * @return {Void} */ function onPlayerStateChange( event ) { var isPlay = 1 === event.data; var isPause = 2 === event.data; var isEnd = 0 === event.data; if ( isPlay ) { $featuredVideo.removeClass( "is-paused" ); $featuredVideo.toggleClass( "is-playing" ); } if ( isPause ) { $featuredVideo.removeClass( "is-playing" ); $featuredVideo.toggleClass( "is-paused" ); } if ( isEnd ) { $featuredVideo.removeClass( "is-playing", "is-paused" ); } } /** * _.Underscore.js throttle. * * Delay executing a function. It will reduce the notifications of an event that fires multiple times. * * @see http://stackoverflow.com/questions/27078285/simple-throttle-in-js * * @param {Function} func The function to execute. * @param {Number} wait The delay time. * @param {Object} options Some options. * @return {Function} The function to execute. */ // function throttle( func, wait, options ) { // // var context, args, result; // var timeout = null; // var previous = 0; // if ( !options ) { // options = {}; // } // // var later = function() { // previous = options.leading === false ? 0 : Date.now(); // timeout = null; // result = func.apply( context, args ); // if ( !timeout ) { // context = args = null; // } // }; // // return function() { // var now = Date.now(); // if ( !previous && options.leading === false ) { // previous = now; // } // var remaining = wait - ( now - previous ); // context = this; // args = arguments; // if ( remaining <= 0 || remaining > wait ) { // if ( timeout ) { // clearTimeout( timeout ); // timeout = null; // } // previous = now; // result = func.apply( context, args ); // if ( !timeout ) { // context = args = null; // } // } else if ( !timeout && options.trailing !== false ) { // timeout = setTimeout( later, remaining ); // } // return result; // }; // }; // $window // // .on( "resize", throttle( function() { // top = $featuredMedia.offset().top; // offset = Math.floor( top + ( $featuredMedia.outerHeight() / 2 ) ); // }, 150 ) ) // // .on( "scroll", throttle( function() { // $featuredVideo.toggleClass( "is-sticky", // $window.scrollTop() > offset && $featuredVideo.hasClass( "is-playing" ) // ); // }, 150 ) ); // $window .on( "resize", function() { top = $featuredMedia.offset().top; offset = Math.floor( top + ( $featuredMedia.outerHeight() / 2 ) ); } ) .on( "scroll", function() { $featuredVideo.toggleClass( "is-sticky", $window.scrollTop() > offset && $featuredVideo.hasClass( "is-playing" ) ); } ); } );
[-] SplitText.js
[edit]
[-] awesomeCloud.min.js
[edit]
[-] prism.min.js
[edit]
[-] jquery.progressScroll.js
[edit]
[-] jquery.mThumbnailScroller.min.js
[edit]
[-] parallax.js
[edit]
[-] chart.min.js
[edit]
[-] typed.min.js
[edit]
[-] jquery.appear.min.js
[edit]
[-] lottie.d.ts
[edit]
[-] jquery.imagezoom.js
[edit]
[-] jquery.tagcanvas.min.js
[edit]
[-] prism.js
[edit]
[-] metisMenu.js
[edit]
[-] lottie.js
[edit]
[-] jquery.honeycombs.js
[edit]
[-] sidetabs.js
[edit]
[-] timeline.min.js
[edit]
[-] datatables.min.js
[edit]
[-] datatables.uikit.js
[edit]
[-] jquery.appear.js
[edit]
[+]
..
[-] popper.js
[edit]
[-] jquery.jplayer.js
[edit]
[-] image-compare-viewer.min.js
[edit]
[-] calendly.js
[edit]
[-] tilt.jquery.js
[edit]
[-] particles.min.js
[edit]
[-] jquery.progressHorizontal.min.js
[edit]
[-] timeline.js
[edit]
[-] jQuery.circleMenu.min.js
[edit]
[-] tippy.all.min.js
[edit]
[-] calendly.min.js
[edit]
[-] jquery.jplayer.min.js
[edit]
[-] jquery.newsTicker.min.js
[edit]
[-] darkmode.min.js
[edit]
[-] goodshare.min.js
[edit]
[-] SplitText.min.js
[edit]
[-] jquery.newsTicker.js
[edit]
[-] jquery.flatWeatherPlugin.min.js
[edit]
[-] rvslider.min.js
[edit]
[-] gmap.min.js
[edit]
[-] jquery.jclock.min.js
[edit]
[-] chart.js
[edit]
[-] jquery.mousewheel.js
[edit]
[-] vanilla-tilt.js
[edit]
[-] search.min.js
[edit]
[-] jquery.justifiedGallery.min.js
[edit]
[-] pageable.min.js
[edit]
[-] particles.js
[edit]
[-] jquery.imagezoom.min.js
[edit]
[-] jquery.mousewheel.min.js
[edit]
[-] gmap.js
[edit]
[-] news-ticker.min.js
[edit]
[-] datatables.uikit.min.js
[edit]
[-] tippy.all.js
[edit]
[-] gsap.js
[edit]
[-] table-of-content.min.js
[edit]
[-] gsap.min.js
[edit]
[-] metisMenu.min.js
[edit]
[-] wavify.min.js
[edit]
[-] jquery.progressScroll.min.js
[edit]
[-] morphext.min.js
[edit]
[-] darkmode.js
[edit]
[-] gridtab.min.js
[edit]
[-] morphext.js
[edit]
[-] image-compare-viewer.js
[edit]
[-] parallax.min.js
[edit]
[-] search.js
[edit]
[-] sidetabs.min.js
[edit]
[-] recliner.js
[edit]
[-] countUp.js
[edit]
[-] clipboard.js
[edit]
[-] jquery-asPieProgress.min.js
[edit]
[-] wavify.js
[edit]
[-] recliner.min.js
[edit]
[-] jquery.jclock.js
[edit]
[-] pageable.js
[edit]
[-] jquery.tagcanvas.js
[edit]
[-] gridtab.js
[edit]
[-] jquery-qrcode.js
[edit]
[-] countUp.min.js
[edit]
[-] awesomeCloud.js
[edit]
[-] jquery-asPieProgress.js
[edit]
[-] lottie.min.js
[edit]
[-] moment-timezone-with-data.min.js
[edit]
[-] jquery.justifiedGallery.js
[edit]
[-] datatables.js
[edit]
[-] rvslider.js
[edit]
[-] jquery.flatWeatherPlugin.js
[edit]
[-] moment.min.js
[edit]
[-] jquery.honeycombs.min.js
[edit]
[-] table-of-content.js
[edit]
[-] goodshare.js
[edit]
[-] leaflet.js
[edit]
[-] cookieconsent.min.js
[edit]
[-] moment-timezone-with-data.js
[edit]
[-] jQuery.circleMenu.js
[edit]
[-] leaflet.min.js
[edit]
[-] vanilla-tilt.min.js
[edit]
[-] floating-video.min.js
[edit]
[-] typed.js
[edit]
[-] popper.min.js
[edit]
[-] spritespin.js
[edit]
[-] jquery.progressHorizontal.js
[edit]
[-] floating-video.js
[edit]
[-] jquery.mThumbnailScroller.js
[edit]
[-] moment.js
[edit]
[-] spritespin.min.js
[edit]
[-] tilt.jquery.min.js
[edit]
[-] jquery-qrcode.min.js
[edit]
[-] cookieconsent.js
[edit]