1// When the document is ready... 2jQuery( document ).ready( function( $ ) { 3 var stickyNavTop = $('#masthead').offset().top; 4 5 // our function that decides weather the navigation bar should have "fixed" css position or not. 6 var stickyNav = function(){ 7 var scrollTop = $(window).scrollTop(); // our current vertical position from the top 8 9 10 11 // if we've scrolled more than the navigation, change its position to fixed to stick to top, 12 // otherwise change it back to relative 13 if (scrollTop > stickyNavTop) { 14 $('#masthead').addClass('fixed-header'); 15 $('#nav-icon').addClass('fixed-nav'); 16 17 } else { 18 $('#masthead').removeClass('fixed-header'); 19 $('#nav-icon').removeClass('fixed-nav'); 20 } 21 }; 22 23 stickyNav(); 24 // and run it again every time you scroll 25 $(window).scroll(function() { 26 stickyNav(); 27 }); 28 29 // Toggle search 30 let rf_page_wrapper = $( '#page' ); 31 let rf_search_wrapper = $( '#site-search-wrapper' ); 32 $( '.toggle_search' ).on( 'click', function(e) { 33 e.preventDefault(); 34 if( rf_search_wrapper.hasClass( 'rf_active' ) ) { 35 rf_page_wrapper.removeClass( 'rf_active' ); 36 rf_search_wrapper.removeClass( 'rf_active' ); 37 rf_search_wrapper.slideUp( 'medium' ); 38 } else { 39 rf_page_wrapper.addClass( 'rf_active' ); 40 rf_search_wrapper.addClass( 'rf_active' ); 41 rf_search_wrapper.slideDown( 'medium' ); 42 } 43 }); 44 45// Homepage categories links 46 $(".courses-grid .row .col-12, .stundent-boxes").click(function() { 47 window.location = $(this).find("a").attr("href"); 48 return false; 49 }); 50 51 // Init WOW.js and get instance 52 var wow = new WOW(); 53 wow.init(); 54// Attach scrollSpy to .wow elements for detect view exit events, 55 // then reset elements and add again for animation 56 setTimeout(function(){ 57 if ($('.courses-section').hasClass('animated')) { 58 $(this).removeClass('animated'); 59 $(this).removeAttr('style'); 60 new WOW().init(); 61} 62 63 }, 100); 64 65 var windowsWidth = window.innerWidth; 66 $("#nav-icon, #sidebar-icon").click(function() { 67 $('.slide-menu').toggle( { 68 direction: 'left' 69 }, 2000); 70 $("#nav-icon").toggleClass('open'); 71 if (windowsWidth < 500){ 72 setTimeout(function(){ 73 $("#nav-icon").toggleClass('nav-icon-mobile'); 74 }, 1000); 75 } 76 }); 77 78 $(".apply-now").click(function() { 79 var url = $(this).find("a").attr("href"); 80 window.open(url, '_blank'); 81 return false; 82 }); 83 84 var $videoSrc; 85 $('.video_testimonial').click(function() { 86 $videoSrc = $(this).attr("data-src"); 87 $("#video").attr('src',$videoSrc + "?rel=0&showinfo=0&modestbranding=1&autoplay=1" ); 88 }); 89 90 $('body:not(#videoModal, #videoModal *), body #videoModal button.close').on('click', function (e) { 91 // a poor man's stop video 92 $("#video").attr('src',$videoSrc); 93 }); 94 95 // when the modal is opened autoplay it 96 $('#videoModal').appendTo("body").on('shown.bs.modal', function (e) { 97 98 // set the video src to autoplay and not to show related video. Youtube related video is like a box of chocolates... you never know what you're gonna get 99 $("#video").attr('src',$videoSrc + "?rel=0&showinfo=0&modestbranding=1&autoplay=1" ); 100 }) 101 102 103 // stop playing the youtube video when I close the modal 104 $('#videoModal').on('hide.bs.modal', function (e) { 105 // a poor man's stop video 106 $("#video").attr('src',$videoSrc); 107 }); 108 109 110}); 111 112 113 114 115
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.