1 2(function ($) { 3 "use strict"; 4 5 /*[ Load page ] 6 ===========================================================*/ 7 $(".animsition").animsition({ 8 inClass: 'fade-in', 9 outClass: 'fade-out', 10 inDuration: 1500, 11 outDuration: 800, 12 linkElement: '.animsition-link', 13 loading: true, 14 loadingParentElement: 'html', 15 loadingClass: 'animsition-loading-1', 16 loadingInner: '<div class="cp-spinner cp-meter"></div>', 17 timeout: false, 18 timeoutCountdown: 5000, 19 onLoadEvent: true, 20 browser: [ 'animation-duration', '-webkit-animation-duration'], 21 overlay : false, 22 overlayClass : 'animsition-overlay-slide', 23 overlayParentElement : 'html', 24 transition: function(url){ window.location.href = url; } 25 }); 26 27 /*[ Back to top ] 28 ===========================================================*/ 29 var windowH = $(window).height()/2; 30 31 $(window).on('scroll',function(){ 32 if ($(this).scrollTop() > windowH) { 33 $("#myBtn").css('display','flex'); 34 } else { 35 $("#myBtn").css('display','none'); 36 } 37 }); 38 39 $('#myBtn').on("click", function(){ 40 $('html, body').animate({scrollTop: 0}, 300); 41 }); 42 43 44 /*[ Select ] 45 ===========================================================*/ 46 $(".selection-1").select2({ 47 minimumResultsForSearch: 20, 48 dropdownParent: $('#dropDownSelect1') 49 }); 50 51 /*[ Daterangepicker ] 52 ===========================================================*/ 53 $('.my-calendar').daterangepicker({ 54 "singleDatePicker": true, 55 "showDropdowns": true, 56 locale: { 57 format: 'DD/MM/YYYY' 58 }, 59 }); 60 61 var myCalendar = $('.my-calendar'); 62 var isClick = 0; 63 64 $(window).on('click',function(){ 65 isClick = 0; 66 }); 67 68 $(myCalendar).on('apply.daterangepicker',function(){ 69 isClick = 0; 70 }); 71 72 $('.btn-calendar').on('click',function(e){ 73 e.stopPropagation(); 74 75 if(isClick == 1) isClick = 0; 76 else if(isClick == 0) isClick = 1; 77 78 if (isClick == 1) { 79 myCalendar.focus(); 80 } 81 }); 82 83 $(myCalendar).on('click',function(e){ 84 e.stopPropagation(); 85 isClick = 1; 86 }); 87 88 $('.daterangepicker').on('click',function(e){ 89 e.stopPropagation(); 90 }); 91 92 93 /*[ Play video 01] 94 ===========================================================*/ 95 var srcOld = $('.video-mo-01').children('iframe').attr('src'); 96 97 $('[data-target="#modal-video-01"]').on('click',function(){ 98 $('.video-mo-01').children('iframe')[0].src += "&autoplay=1"; 99 100 setTimeout(function(){ 101 $('.video-mo-01').css('opacity','1'); 102 },300); 103 }); 104 105 $('[data-dismiss="modal"]').on('click',function(){ 106 $('.video-mo-01').children('iframe')[0].src = srcOld; 107 $('.video-mo-01').css('opacity','0'); 108 }); 109 110 111 /*[ Fixed Header ] 112 ===========================================================*/ 113 var header = $('header'); 114 var logo = $(header).find('.logo img'); 115 var linkLogo1 = $(logo).attr('src'); 116 var linkLogo2 = $(logo).data('logofixed'); 117 118 119 $(window).on('scroll',function(){ 120 if($(this).scrollTop() > 5 && $(this).width() > 992) { 121 $(logo).attr('src',linkLogo2); 122 $(header).addClass('header-fixed'); 123 } 124 else { 125 $(header).removeClass('header-fixed'); 126 $(logo).attr('src',linkLogo1); 127 } 128 129 }); 130 131 /*[ Show/hide sidebar ] 132 ===========================================================*/ 133 $('body').append('<div class="overlay-sidebar trans-0-4"></div>'); 134 var ovlSideBar = $('.overlay-sidebar'); 135 var btnShowSidebar = $('.btn-show-sidebar'); 136 var btnHideSidebar = $('.btn-hide-sidebar'); 137 var sidebar = $('.sidebar'); 138 139 $(btnShowSidebar).on('click', function(){ 140 $(sidebar).addClass('show-sidebar'); 141 $(ovlSideBar).addClass('show-overlay-sidebar'); 142 }) 143 144 $(btnHideSidebar).on('click', function(){ 145 $(sidebar).removeClass('show-sidebar'); 146 $(ovlSideBar).removeClass('show-overlay-sidebar'); 147 }) 148 149 $(ovlSideBar).on('click', function(){ 150 $(sidebar).removeClass('show-sidebar'); 151 $(ovlSideBar).removeClass('show-overlay-sidebar'); 152 }) 153 154 155 /*[ Isotope ] 156 ===========================================================*/ 157 var $topeContainer = $('.isotope-grid');
158 var $filter = $('.filter-tope-group'); 159 160 // filter items on button click 161 $filter.each(function () { 162 $filter.on('click', 'button', function () { 163 var filterValue = $(this).attr('data-filter'); 164 $topeContainer.isotope({filter: filterValue}); 165 }); 166 167 }); 168 169 // init Isotope 170 $(window).on('load', function () { 171 var $grid = $topeContainer.each(function () { 172 $(this).isotope({ 173 itemSelector: '.isotope-item', 174 percentPosition: true, 175 animationEngine : 'best-available', 176 masonry: { 177 columnWidth: '.isotope-item' 178 } 179 }); 180 }); 181 }); 182 183 var labelGallerys = $('.label-gallery'); 184 185 $(labelGallerys).each(function(){ 186 $(this).on('click', function(){ 187 for(var i=0; i<labelGallerys.length; i++) { 188 $(labelGallerys[i]).removeClass('is-actived'); 189 } 190 191 $(this).addClass('is-actived'); 192 }); 193 }); 194 195 196 197})(jQuery);
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.