1(function ($) { 2 "use strict"; 3 4 /*------------------------------------ 5 Search Option 6 ------------------------------------- */ 7 $('.search-btn-area .input-group').hide(); 8 $(".main-search").on('click', function(event) { 9 event.preventDefault(); 10 $('.search-btn-area .input-group').animate( { 11 height: 'toggle', 12 } 13 ); 14 }); 15 /*-------------------------- 16 Scroll Sticky 17 ---------------------------- */ 18 var windows = $(window); 19 var Header = $(".header"); 20 if (Header.length) { 21 windows.on('scroll', function() { 22 var scroll = windows.scrollTop(); 23 if (scroll > 150) { 24 $(".header").addClass('stick'); 25 } 26 else { 27 $(".header").removeClass('stick'); 28 } 29 }); 30 } 31 32 if ($(window).width() < 768) { 33 $('.dropdown-menu a.dropdown-toggle').on('click', function(e) { 34 if (!$(this).next().hasClass('show')) { 35 $(this).parents('.dropdown-menu').first().find('.show').removeClass("show"); 36 } 37 var $subMenu = $(this).next(".dropdown-menu"); 38 $subMenu.toggleClass('show'); 39 40 $(this).parents('li.nav-item.dropdown.show').on('hidden.bs.dropdown', function(e) { 41 $('.dropdown-submenu .show').removeClass("show"); 42 }); 43 44 return false; 45 }); 46 } 47 48 /*-------------------------- 49 Pricing Plan 50 ---------------------------- */ 51 $('.pricing-btn a:nth-child(1)').on('click', function(event) { 52 event.preventDefault(); 53 $(this).addClass('active'); 54 $('.pricing-btn a:nth-child(2)').removeClass('active'); 55 $('.pricing-box-one').addClass('position'); 56 $('.pricing-box-two').removeClass('position'); 57 }); 58 $('.pricing-btn a:nth-child(2)').on('click', function(event) { 59 event.preventDefault(); 60 $(this).addClass('active'); 61 $('.pricing-btn a:nth-child(1)').removeClass('active'); 62 $('.pricing-box-one').removeClass('position'); 63 $('.pricing-box-two').addClass('position'); 64 }); 65 66 67 /*-------------------------- 68 ScrollUp 69 ---------------------------- */ 70 if(('#scrollUp').length) { 71 $.scrollUp( { 72 scrollText: '<i class="fa fa-angle-up"></i>', easingType: 'linear', scrollSpeed: 900, animation: 'fade' 73 }); 74 } 75 76 $(".search-form label").append('<button type="submit" class="search-submit" value=""><i class="fa fa-search"></i></button>'); 77 $("input.search-submit").hide(); 78 79 /*-------------------------- 80 Mouse Move 81 ---------------------------- */ 82 var nodes = [].slice.call(document.querySelectorAll('.mouse-move'), 0); 83 var directions = { 0: 'top', 1: 'right', 2: 'bottom', 3: 'left' }; 84 var classNames = ['in', 'out'].map((p) => Object.values(directions).map((d) => `${p}-${d}`)).reduce((a, b) => a.concat(b)); 85 86 var getDirectionKey = (ev, node) => { 87 var { width, height, top, left } = node.getBoundingClientRect(); 88 var l = ev.pageX - (left + window.pageXOffset); 89 var t = ev.pageY - (top + window.pageYOffset); 90 var x = (l - (width/2) * (width > height ? (height/width) : 1)); 91 var y = (t - (height/2) * (height > width ? (width/height) : 1)); 92 return Math.round(Math.atan2(y, x) / 1.57079633 + 5) % 4; 93 } 94 95 class Item { 96 constructor(element) { 97 this.element = element; 98 this.element.addEventListener('mouseover', (ev) => this.update(ev, 'in')); 99 this.element.addEventListener('mouseout', (ev) => this.update(ev, 'out')); 100 } 101 102 update(ev, prefix) { 103 this.element.classList.remove(...classNames); 104 this.element.classList.add(`${prefix}-${directions[getDirectionKey(ev, this.element)]}`); 105 } 106 } 107 108 nodes.forEach(node => new Item(node)); 109 110 /*---------------------------- 111 Venobox Popup 112 ------------------------------ */ 113 $('.venobox').venobox( { 114 border: '3px', titleattr: 'data-title', numeratio: true, infinigall: true 115 }); 116 117 /*--------------------- 118 Counter 119 ---------------------*/ 120 var timer = $('.timer'); 121 if(timer.length) {
122 timer.appear(function () { 123 timer.countTo(); 124 }) 125 } 126 127 /*--------------------- 128 Clients carousel 129 ---------------------*/ 130 var TeamMember=$('.member-slider'); 131 TeamMember.owlCarousel( { 132 items: 4, 133 loop:false, 134 nav:true, 135 margin: 30, 136 dots:false, 137 autoplay:false, 138 navText: ["<i class='fas fa-arrow-left'></i>", "<i class='fas fa-arrow-right'></i>"], 139 responsive: { 140 0: { 141 items: 1, 142 autoplay:true, 143 } 144 , 768: { 145 items: 2 146 } 147 , 992: { 148 items: 3 149 } 150 , 1200: { 151 items: 4 152 } 153 } 154 }); 155 $('.member-slider .owl-nav').removeClass('disabled'); 156 157 $('.member-slider .owl-nav').on('click', function(event) { 158 $(this).removeClass('disabled'); 159 }); 160 161 /*--------------------- 162 Blog carousel 163 ---------------------*/ 164 var Blog=$('.single-news-slider'); 165 Blog.owlCarousel( { 166 items: 1, 167 loop:true, 168 nav:true, 169 margin: 0, 170 dots:false, 171 autoplay:true, 172 navText: ["<i class='fas fa-arrow-left'></i>", "<i class='fas fa-arrow-right'></i>"] 173 }); 174 $('.single-news-slider .owl-nav').removeClass('disabled'); 175 176 $('.single-news-slider .owl-nav').on('click', function(event) { 177 $(this).removeClass('disabled'); 178 }); 179 180 /*--------------------- 181 Testimonial carousel 182 ---------------------*/ 183 if($('.feedback-block').length){ 184 var feedbackBxSlider = $('.feedback-block'); 185 if (feedbackBxSlider.length > 0) { 186 feedbackBxSlider.bxSlider({ 187 auto: true, 188 controls: true, 189 mode: 'fade', 190 pause: 5000, 191 speed: 600, 192 pager: true, 193 pagerCustom: '#feedback-slider-pager' 194 }); 195 } 196 } 197 198 /*--------------------- 199 Video 200 ---------------------*/ 201 $(".cd-popup-trigger").on("click", function(p) { 202 p.preventDefault(), $(".cd-popup").addClass("is-visible") 203 }), $(".cd-popup").on("click", function(p) { 204 ($(p.target).is(".cd-popup-close") || $(p.target).is(".cd-popup")) && (p.preventDefault(), $(this).removeClass("is-visible")) 205 }); 206 207 /*--------------------- 208 WOW 209 ---------------------*/ 210 if ($('.wow').length) { 211 var wow = new WOW({ 212 mobile: false 213 }); 214 wow.init(); 215 }; 216 217 /*--------------------- 218 Add Class To social icons 219 ---------------------*/ 220 221 $(".fa-facebook-f").parents("a").addClass("facebook"); 222 $(".fa-google-plus-g").parents("a").addClass("google-plus"); 223 $(".fa-skype").parents("a").addClass("skype"); 224 $(".fa-pinterest-p").parents("a").addClass("pinterest"); 225 $(".fa-instagram").parents("a").addClass("instagram"); 226 $(".fa-linkedin-in").parents("a").addClass("linkedin"); 227 $(".fa-twitter").parents("a").addClass("twitter"); 228 229 /*--------------------- 230 Show Position In Modal 231 ---------------------*/ 232 $(function () { 233 $('#apply').on('show.bs.modal', function (event) { 234 var button = $(event.relatedTarget); // Button that triggered the modal 235 var position = button.data('position'); // Extract info from data-* attributes 236 // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
237 // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead. 238 var modal = $(this); 239 modal.find('#position').val(position); 240 }); 241 }); 242 243 244 $(function(){ 245 $("#choose").on('click', function(e){ 246 e.preventDefault(); 247 $("#resume:hidden").trigger('click'); 248 }); 249 }); 250 $('#resume').change(function() { 251 var file = $('#resume')[0].files[0].name; 252 $('#filename').css('display','block'); 253 $('#filename').text(file); 254 }); 255 256 /*--------------------- 257 Mail Ajax 258 ---------------------*/ 259 if($('.contact-form').length) { 260 var form = $('#ajax-contact'); 261 var formMessages = $('.form-messages'); 262 $(form).submit(function(e) { 263 e.preventDefault(); 264 var formData = $(form).serialize(); 265 $.ajax({ 266 type: 'POST', 267 url: $(form).attr('action'), 268 data: formData 269 }).done(function(response) { 270 $(formMessages).removeClass('error'); 271 $(formMessages).addClass('success'); 272 $(formMessages).text(response); 273 $(this).find("input").val(""); 274 $(form).trigger("reset"); 275 }).fail(function(data) { 276 $(formMessages).removeClass('success'); 277 $(formMessages).addClass('error'); 278 if (data.responseText !== '') { 279 $(formMessages).text(data.responseText); 280 } else { 281 $(formMessages).text('Oops! An error occured and your message couldn\'t be sent.'); 282 } 283 }); 284 }); 285 } 286 287 288})(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.