1$(document).ready(function(){ 2 3 "use strict"; 4 5 /* ================================= 6 LOADER 7 =================================== */ 8 $(".loader").delay(400).fadeOut(); 9 $(".animationload").delay(400).fadeOut("fast"); 10 11 var bgi = $("[data-background]"); 12 bgi.length > 0 && bgi.each(function() { 13 var e = $(this), 14 t = e.attr('data-background'); 15 e.css({'background-image': 'url(' + t + ')'}); 16 }); 17 18 var progressBar = $('.progress-bar'); 19 progressBar.length > 0 && progressBar.each(function() { 20 var e = $(this), 21 t = e.attr('aria-valuenow'); 22 e.css({'width': t + '%'}); 23 }); 24 25 /* ================================= 26 SCROLL TO 27 =================================== */ 28 $('a[href^="#"]').on('click', function(event) { 29 30 var target = $(this.getAttribute('href')); 31 32 if( target.length ) { 33 event.preventDefault(); 34 $('html, body').stop().animate({ 35 scrollTop: target.offset().top 36 }, 1000); 37 } 38 39 }); 40 41 42 /* ================================= 43 NAVBAR 44 =================================== */ 45 var top = jQuery(document).scrollTop(); 46 var batas = 200; 47 var navbar = jQuery('.navbar-main'); 48 var navbarnav = jQuery('.navbar-nav'); 49 var header = jQuery('.header'); 50 var navbarCollapse = $(".navbar-collapse"); 51 52 53 if ( top > batas ) { 54 navbar.addClass('stiky'); 55 navbarnav.addClass('ml-auto'); 56 } 57 jQuery(window).scroll(function () { 58 top = jQuery(document).scrollTop(); 59 60 61 if ( top > batas ) { 62 navbar.addClass('stiky'); 63 navbarnav.addClass('ml-auto'); 64 }else { 65 navbar.removeClass('stiky'); 66 if(header.hasClass('header-1')){ 67 navbarnav.removeClass('ml-auto'); 68 } 69 } 70 71 72 }); 73 74 75 navbarCollapse.on("click", "a", null, function () { 76 navbarCollapse.collapse('hide'); 77 }); 78 79 80 81 /* ================================= 82 BACK TO TOP 83 =================================== */ 84 // browser window scroll (in pixels) after which the "back to top" link is shown 85 var offset = 300, 86 //browser window scroll (in pixels) after which the "back to top" link opacity is reduced 87 offset_opacity = 1200, 88 //duration of the top scrolling animation (in ms) 89 scroll_top_duration = 700, 90 //grab the "back to top" link 91 $back_to_top = $('.cd-top'); 92 93 //hide or show the "back to top" link 94 $(window).scroll(function(){ 95 ( $(this).scrollTop() > offset ) ? $back_to_top.addClass('cd-is-visible') : $back_to_top.removeClass('cd-is-visible cd-fade-out'); 96 if( $(this).scrollTop() > offset_opacity ) { 97 $back_to_top.addClass('cd-fade-out'); 98 } 99 }); 100 101 //smooth scroll to top 102 $back_to_top.on('click', function(event){ 103 event.preventDefault(); 104 $('body,html').animate({ 105 scrollTop: 0 , 106 }, scroll_top_duration 107 ); 108 }); 109 110 111 112 113 114 115}); 116 117 118 119 120 121
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.