1(function($){ 2 'use strict' 3 //play album 4 $('[data-record="play-album"]').click(function() { 5 $(".track-list").removeClass('re-opacity'); 6 $(".record-box-release").addClass('active-release'); 7 // $('[data-record="album-disk"]').addClass('fa fa-spin'); 8 $(".record-box-release").removeClass('none-active'); 9 $('[data-record="buy-album"]').hide(); 10 }); 11 //All effect in page 12 var MQL =320; 13 var windowHeight = $(window).height(); 14 var windowWidth = $(window).width(); 15 if (windowWidth === 1349 && windowHeight === 667) { 16 $('header, section, footer').css('zoom', '90%') 17 $('.main-slider').removeAttr('style') 18 $('.page-cover, .main-slider').css('margin-top','75px'); 19 } 20 21 // Back to top 22 $(".back-to-top").click(function () { 23 $("html, body").animate({scrollTop: 0}, 1000); 24 }); 25 26 //primary navigation slide-in effect 27 if(jQuery(window).width() > MQL) { 28 var headerHeight = $('.header').height(); 29 jQuery(window).on('scroll', 30 { 31 previousTop: 0 32 }, 33 function () { 34 var currentTop = $(window).scrollTop(); 35 if (currentTop < this.previousTop ) { 36 jQuery('.header').addClass('is-visible') 37 if (currentTop < 20) jQuery('.header').removeClass('is-fixed').removeClass('is-visible') 38 } else { 39 if (currentTop > headerHeight) jQuery('.header').addClass('is-fixed').removeClass('is-visible') 40 } 41 this.previousTop = currentTop; 42 }); 43 } 44 var win = $(window), 45 testimonial = $('.testimonial-slider'), 46 cCarousel = $('.custom-carousel'), 47 moreBtnIcon = '<div class="more"><a href="#main"><i class="icon icon-arrow-down"></i></a></div>'; 48 49 /* Milestone */ 50 var countItem = $('.count-item'); 51 function milestone() { 52 countItem.each(function () { 53 54 var $this = $(this); 55 $this.onScreen({ 56 doIn: function () { 57 var countNumber = $this.find('.count-number'), 58 countTitle = $this.find('.count-subject'); 59 countNumber.countTo({ 60 onComplete: function () { 61 countTitle.delay(100).addClass('subject-on'); 62 countNumber.removeClass('count-number').addClass('count-number-done'); 63 } 64 }); 65 }, 66 }); 67 }); 68 } 69 if (countItem.length) { 70 milestone(); 71 } 72 $('ul.tabs li').click(function(){ 73 var tab_id = $(this).attr('data-tab'); 74 75 $('ul.tabs li').removeClass('current'); 76 $('.tab-content').removeClass('current'); 77 78 $(this).addClass('current'); 79 $("#"+tab_id).addClass('current'); 80 }) 81 82 83 $( "body" ).on('click','.close_all',function() { 84 $('#myModal').modal('hide'); 85 }); 86 $(document).on('click', 'a.controls', function(){ 87 var index = $(this).attr('href'); 88 var src = $('ul.row li:nth-child('+ index +') img').attr('src'); 89 90 $('.modal-body img').attr('src', src); 91 92 var newPrevIndex = parseInt(index) - 1; 93 var newNextIndex = parseInt(newPrevIndex) + 2; 94 95 if($(this).hasClass('previous')){ 96 $(this).attr('href', newPrevIndex); 97 $('a.next').attr('href', newNextIndex); 98 }else{ 99 $(this).attr('href', newNextIndex); 100 $('a.previous').attr('href', newPrevIndex); 101 } 102 103 var total = $('ul.row li').length + 1; 104 //hide next button 105 if(total === newNextIndex){ 106 $('a.next').hide(); 107 }else{ 108 $('a.next').show() 109 } 110 //hide previous button 111 if(newPrevIndex === 0){ 112 $('a.previous').hide(); 113 }else{ 114 $('a.previous').show() 115 } 116 return false; 117 }); 118 //hambeger-menu 119 // Function for mobile 120 var $closeButton = '<span class="close"></span>'; 121 $('body').on('click touchstart','.humberger-button', function(e){
122 showMenuHambe(); 123 return false; 124 }) 125 $('body').on('click touchstart','.re-main-navigation .close', function(){ 126 hideMenuHambe(); 127 return false; 128 }); 129 130 function showMenuHambe(){ 131 $('.re-main-navigation').append($closeButton); 132 $('.re-main-navigation').addClass('nav-active'); 133 $('.element-right .olay').css({display:'block'}); 134 $('body').addClass('mobile-menu-open'); 135 } 136 function hideMenuHambe(){ 137 $('.close').remove(); 138 $('.re-main-navigation').removeClass('nav-active'); 139 $('.element-right .olay').css({display:'none'}); 140 $('body').removeClass('mobile-menu-open'); 141 } 142 $('body').on('click touchstart',function(e) { 143 var mobileMenu = $('.re-main-navigation'); 144 if (!$(e.target).closest(mobileMenu).length) { 145 hideMenuHambe(); 146 } 147 }); 148 $('.sub-menu .menu-item,.children .page_item').css({display:'none'}); 149 $( ".menu-item-has-children,.page_item_has_children" ).find( "ul" ).append("<i class='fa fa-angle-down'></i>"); 150 // $(".sub-menu,.children").on('click', '.fa', function(event) { 151 $(".menu-item-has-children > a,.sub-menu .fa").on('click', function(event) { 152 event.preventDefault(); 153 $(this).closest('.menu-item-has-children,.page_item_has_children').find('.sub-menu > .menu-item,.children > .page_item').toggle(); 154 return false; 155 }); 156 $(document).on({ 157 ajaxStart: function() { $("body").addClass("loading"); }, 158 ajaxStop: function() { $("body").removeClass("loading"); } 159 }); 160})(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.