1/* 2 3Template: Appino - Responsive App Landing Page 4Author: iqonicthemes.in 5Version: 1.0 6 7*/ 8 9/*---------------------------------------------- 10Index Of Script 11------------------------------------------------ 12 131.Page Loader 142.Back To Top 153.Hide Menu 164.Accordion 175.Silder 186.Magnific Popup 197.Countdown 208.widget 219.counter 2210.Tab Mobile 2311.Force a hover to see the effect 2412.Wow Animation 2513.Owl Carousel 2614.Nev bar active 2715.Contact From 28 29------------------------------------------------ 30Index Of Script 31----------------------------------------------*/ 32 33$(document).ready(function() { 34 try { 35 36 /*------------------------ 37 Page Loader 38 --------------------------*/ 39 jQuery("#load").fadeOut(); 40 jQuery("#loading").delay(0).fadeOut("slow"); 41 42 43 44 /*------------------------ 45 Back To Top 46 --------------------------*/ 47 $('#back-to-top').fadeOut(); 48 $(window).on("scroll", function() { 49 if ($(this).scrollTop() > 250) { 50 $('#back-to-top').fadeIn(1400); 51 } else { 52 $('#back-to-top').fadeOut(400); 53 } 54 }); 55 // scroll body to 0px on click 56 $('#top').on('click', function() { 57 $('top').tooltip('hide'); 58 $('body,html').animate({ 59 scrollTop: 0 60 }, 800); 61 return false; 62 }); 63 64 65 66 /*------------------------ 67 Hide Menu 68 --------------------------*/ 69 $(".navbar a").on("click", function(event) { 70 $(".navbar-collapse").collapse('hide'); 71 }); 72 73 74 75 /*------------------------ 76 Accordion 77 --------------------------*/ 78 $('.iq-accordion .iq-ad-block .ad-details').hide(); 79 $('.iq-accordion .iq-ad-block:first').addClass('ad-active').children().slideDown('slow'); 80 $('.iq-accordion .iq-ad-block').on("click", function() { 81 if($(this).children('div').is(':hidden')) { 82 $('.iq-accordion .iq-ad-block').removeClass('ad-active').children('div').slideUp('slow'); 83 $(this).toggleClass('ad-active').children('div').slideDown('slow'); 84 } 85 }); 86 87 88 /*------------------------ 89 Silder 90 --------------------------*/ 91 (function($) { 92 //Function to animate slider captions 93 function doAnimations(elems) { 94 //Cache the animationend event in a variable 95 var animEndEv = 'webkitAnimationEnd animationend'; 96 97 elems.each(function() { 98 var $this = $(this), 99 $animationType = $this.data('animation'); 100 $this.addClass($animationType).one(animEndEv, function() { 101 $this.removeClass($animationType); 102 }); 103 }); 104 } 105 106 //Variables on page load 107 var $myCarousel = $('#carousel-example-generic'), 108 $firstAnimatingElems = $myCarousel.find('.item:first').find("[data-animation ^= 'animated']"); 109 110 //Initialize carousel 111 $myCarousel.carousel(); 112 113 //Animate captions in first slide on page load 114 doAnimations($firstAnimatingElems); 115 116 //Pause carousel 117 $myCarousel.carousel('pause'); 118 119 120 //Other slides to be animated on carousel slide event 121 $myCarousel.on('slide.bs.carousel', function(e) { 122 var $animatingElems = $(e.relatedTarget).find("[data-animation ^= 'animated']"); 123 doAnimations($animatingElems); 124 }); 125 126 })(jQuery); 127 128 129 /*------------------------ 130 Magnific Popup 131 --------------------------*/ 132 $('.popup-gallery').magnificPopup({ 133 delegate: 'a.popup-img', 134 tLoading: 'Loading image #%curr%...', 135 type: 'image', 136 mainClass: 'mfp-img-mobile', 137 gallery: { 138 navigateByImgClick: true, 139 enabled: true, 140 preload: [0, 1] 141 }, 142 image: { 143 tError: '<a href="%url%">The image #%curr%</a> could not be loaded.' 144 } 145 }); 146 147 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({ 148 type: 'iframe', 149 disableOn: 700, 150 mainClass: 'mfp-fade', 151 preloader: false, 152 removalDelay: 160,
153 fixedContentPos: false 154 }); 155 156 157 /*------------------------ 158 Countdown 159 --------------------------*/ 160 $('#countdown').countdown({ 161 date: '01/25/2020 23:59:59', 162 day: 'Day', 163 days: 'Days' 164 }); 165 166 167 168 /*------------------------ 169 widget 170 --------------------------*/ 171 $('.iq-widget-menu > ul > li > a').on('click', function() { 172 var checkElement = $(this).next(); 173 $('.iq-widget-menu li').removeClass('active'); 174 $(this).closest('li').addClass('active'); 175 if ((checkElement.is('ul')) && (checkElement.is(':visible'))) { 176 $(this).closest('li').removeClass('active'); 177 checkElement.slideUp('normal'); 178 } 179 if ((checkElement.is('ul')) && (!checkElement.is(':visible'))) { 180 $('.iq-widget-menu ul ul:visible').slideUp('normal'); 181 checkElement.slideDown('normal'); 182 } 183 if ($(this).closest('li').find('ul').children().length === 0) { 184 return true; 185 } else { 186 return false; 187 } 188 }); 189 190 191 /*------------------------ 192 counter 193 --------------------------*/ 194 $('.timer').countTo(); 195 196 197 /*------------------------ 198 Tab Mobile 199 --------------------------*/ 200 $('.fadeInLeft').on('click', function() { 201 $('.fadeInRight').removeClass('active'); 202 203 }); 204 $('.fadeInRight').on('click', function() { 205 $('.fadeInLeft').removeClass('active'); 206 207 }); 208 209 210 211 /*--------------------------------- 212 Force a hover to see the effect 213 ---------------------------------*/ 214 // Force a hover to see the effect 215 var share = document.querySelector('.share'); 216 if (share !== null) { 217 setTimeout(function() { 218 share.classList.add("hover"); 219 }, 1000); 220 setTimeout(function() { 221 share.classList.remove("hover"); 222 }, 3000); 223 } 224 225 226 227 /*------------------------ 228 Wow Animation 229 --------------------------*/ 230 var wow = new WOW({ 231 boxClass: 'wow', 232 animateClass: 'animated', 233 offset: 0, 234 mobile: false, 235 live: true 236 }); 237 wow.init(); 238 239 240 /*------------------------ 241 Owl Carousel 242 --------------------------*/ 243 $('.owl-carousel').each(function() { 244 var $carousel = $(this); 245 $carousel.owlCarousel({ 246 items: $carousel.data("items"), 247 loop: $carousel.data("loop"), 248 margin: $carousel.data("margin"), 249 nav: $carousel.data("nav"), 250 dots: $carousel.data("dots"), 251 autoplay: $carousel.data("autoplay"), 252 autoplayTimeout: $carousel.data("autoplay-timeout"), 253 navText: ['<i class="fa fa-angle-left fa-2x"></i>', '<i class="fa fa-angle-right fa-2x"></i>'], 254 responsiveClass: true, 255 responsive: { 256 // breakpoint from 0 up 257 0: { 258 items: $carousel.data("items-mobile-sm") 259 }, 260 // breakpoint from 480 up 261 480: { 262 items: $carousel.data("items-mobile") 263 }, 264 // breakpoint from 786 up 265 786: { 266 items: $carousel.data("items-tab") 267 }, 268 // breakpoint from 1023 up 269 1023: { 270 items: $carousel.data("items-laptop") 271 }, 272 1199: { 273 items: $carousel.data("items") 274 } 275 } 276 }); 277 }); 278 279 280 /*------------------------ 281 Nev bar active 282 --------------------------*/ 283 var lastId, 284 topMenu = $("#top-menu"), 285 topMenuHeight = topMenu.outerHeight() + 15, 286 // All list items 287 menuItems = topMenu.find("a"), 288 // Anchors corresponding to menu items (only in-page hash links) 289 scrollItems = menuItems.map(function() { 290 var href = $(this).attr("href") || ""; 291 if (href.charAt(0) !== "#") { 292 return; 293 } 294 var item = $(href); 295 if (item.length) { 296 return item; 297 } 298 }); 299 300 // Bind click handler to menu items 301 // so we can get a fancy scroll animation 302 menuItems.on('click', function(e) { 303 var href = $(this).attr("href") || ""; 304 // External / absolute URLs: let the browser navigate normally 305 if (href.charAt(0) !== "#") { 306 return; 307 } 308 var offsetTop = href === "#" ? 0 : $(href).offset().top - topMenuHeight + 1; 309 $('html, body').stop().animate({ 310 scrollTop: offsetTop 311 }, 1500); 312 e.preventDefault(); 313 });
314 315 // Bind to scroll 316 $(window).scroll(function() { 317 // Get container scroll position 318 var fromTop = $(this).scrollTop() + topMenuHeight; 319 320 // Get id of current scroll item 321 var cur = scrollItems.map(function() { 322 if ($(this).offset().top < fromTop) 323 return this; 324 }); 325 // Get the id of the current element 326 cur = cur[cur.length - 1]; 327 var id = cur && cur.length ? cur[0].id : ""; 328 329 if (lastId !== id) { 330 lastId = id; 331 // Set/remove active class 332 menuItems 333 .parent().removeClass("active") 334 .end().filter("[href='#" + id + "']").parent().addClass("active"); 335 } 336 }); 337 338 339 /*------------------------ 340 Contact From 341 --------------------------*/ 342 $('#contactform').submit(function(e) { 343 var flag = 0; 344 e.preventDefault(); // Prevent Default Submission 345 $('.require').each(function() { 346 if ($.trim($(this).val()) == '') { 347 $(this).css("border", "1px solid red"); 348 e.preventDefault(); // Prevent Default Submission 349 flag = 1; 350 } else { 351 $(this).css("border", "1px solid grey"); 352 flag = 0; 353 } 354 }); 355 356 if (grecaptcha.getResponse() == "") { 357 flag = 1; 358 alert('Please verify Recaptch'); 359 360 } else { 361 flag = 0; 362 } 363 364 if (flag == 0) { 365 $.ajax({
366 url: 'php/contact-form.php', 367 type: 'POST', 368 data: $("#contactform").serialize() // it will serialize the form data 369 }) 370 .done(function(data) { 371 $("#result").html('Form was successfully submitted.'); 372 $('#contactform')[0].reset(); 373 }) 374 .fail(function() { 375 alert('Ajax Submit Failed ...'); 376 }); 377 } 378 379 }); 380 381 } catch (err) { 382 if (window.console && console.error) { 383 console.error("custom.js init error:", err); 384 } 385 } 386 387});
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.