1/** ========================================================================================== 2 3 Project : Aqovo - Responsive Multi-purpose HTML5 Template 4 Author : Themetechmount 5 6========================================================================================== */ 7 8/** =============== 9 10 .. Preloader 11 .. header_search 12 .. Fixed-header 13 .. Menu 14 .. Number rotator 15 .. Skillbar 16 .. Tab 17 .. Accordion 18 .. Isotope 19 .. Prettyphoto 20 .. Slick_slider 21 .. Back to top 22 23 =============== */ 24 25 26jQuery(function($) { 27 28 "use strict"; 29 30 31/*------------------------------------------------------------------------------*/ 32/* Preloader 33/*------------------------------------------------------------------------------*/ 34 35 36/*------------------------------------------------------------------------------*/ 37/* header_search 38/*------------------------------------------------------------------------------*/ 39 40 $(".header_search").each(function(){ 41 $(".search_btn", this).on("click", function(e){ 42 e.preventDefault(); 43 $(".header_search_content").toggleClass("on"); 44 }); 45 46 $(".header_search_content_inner .close_btn").on("click", function(e){ 47 e.preventDefault(); 48 $(".header_search_content").removeClass("on"); 49 }); 50 }); 51 52 53/*------------------------------------------------------------------------------*/ 54/* Fixed-header 55/*------------------------------------------------------------------------------*/ 56 57 $(window).on("scroll",function(){ 58 if ( matchMedia( 'only screen and (min-width: 1200px)' ).matches ) 59 { 60 if ($(window).scrollTop() >= 50 ) { 61 62 $('.ttm-stickable-header').addClass('fixed-header'); 63 } 64 else { 65 66 $('.ttm-stickable-header').removeClass('fixed-header'); 67 } 68 } 69 }); 70 71 72/*------------------------------------------------------------------------------*/ 73/* Menu 74/*------------------------------------------------------------------------------*/ 75 76 var menu = { 77 initialize: function() { 78 this.Menuhover(); 79 }, 80 81 Menuhover : function(){ 82 var getNav = $("nav.main-menu"), 83 getWindow = $(window).width(), 84 getHeight = $(window).height(), 85 getIn = getNav.find("ul.menu").data("in"), 86 getOut = getNav.find("ul.menu").data("out"); 87 88 if ( matchMedia( 'only screen and (max-width: 1200px)' ).matches ) { 89 90 // Enable click event 91 $("nav.main-menu ul.menu").each(function(){ 92 93 // Dropdown Fade Toggle 94 $("a.mega-menu-link", this).on('click', function (e) { 95 e.preventDefault(); 96 var t = $(this); 97 t.toggleClass('active').next('ul').toggleClass('active'); 98 }); 99 100 // Megamenu style 101 $(".megamenu-fw", this).each(function(){ 102 $(".col-menu", this).each(function(){ 103 $(".title", this).off("click"); 104 $(".title", this).on("click", function(){ 105 $(this).closest(".col-menu").find(".content").stop().toggleClass('active'); 106 $(this).closest(".col-menu").toggleClass("active"); 107 return false; 108 e.preventDefault(); 109 110 }); 111 112 }); 113 }); 114 115 }); 116 } 117 }, 118 }; 119 120 121 $('.btn-show-menu-mobile').on('click', function(e){ 122 $(this).toggleClass('is-active'); 123 $('.menu-mobile').toggleClass('show'); 124 return false; 125 e.preventDefault(); 126 }); 127 128 // Initialize 129 $(document).ready(function(){ 130 menu.initialize(); 131 132 }); 133 134 135 136 var $bannerSlider = jQuery('.banner_slider'); 137 var $bannerFirstSlide = $('div.slide:first-child'); 138 139 $bannerSlider.on('init', function (e, slick) { 140 var $firstAnimatingElements = $bannerFirstSlide.find('[data-animation]'); 141 slideanimate($firstAnimatingElements); 142 }); 143 $bannerSlider.on('beforeChange', function (e, slick, currentSlide, nextSlide) { 144 var $animatingElements = $('div.slick-slide[data-slick-index="' + nextSlide + '"]').find('[data-animation]'); 145 slideanimate($animatingElements); 146 }); 147 $bannerSlider.slick({ 148 slidesToShow: 1, 149 slidesToScroll: 1, 150 arrows: true, 151 fade: true, 152 dots: false, 153 swipe: true, 154 adaptiveHeight: true, 155 autoplay: true, 156 autoplaySpeed: 2500, 157 pauseOnHover: true, 158 responsive: [ 159 160 { 161 breakpoint: 1200, 162 settings: {
163 arrows: false 164 } 165 }, 166 { 167 breakpoint: 767, 168 settings: { 169 slidesToShow: 1, 170 slidesToScroll: 1, 171 arrows: false, 172 autoplay: true, 173 autoplaySpeed: 2500, 174 swipe: true } 175 }] }); 176 177 function slideanimate(elements) { 178 var animationEndEvents = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; 179 elements.each(function () { 180 var $this = $(this); 181 var $animationDelay = $this.data('delay'); 182 var $animationType = 'animated ' + $this.data('animation'); 183 $this.css({ 184 'animation-delay': $animationDelay, 185 '-webkit-animation-delay': $animationDelay }); 186 187 $this.addClass($animationType).one(animationEndEvents, function () { 188 $this.removeClass($animationType); 189 }); 190 }); 191 } 192 193 194/*------------------------------------------------------------------------------*/ 195/* Animation on scroll: Number rotator 196/*------------------------------------------------------------------------------*/ 197 198 $("[data-appear-animation]").each(function() { 199 var self = $(this); 200 var animation = self.data("appear-animation"); 201 var delay = (self.data("appear-animation-delay") ? self.data("appear-animation-delay") : 0); 202 203 if( $(window).width() > 959 ) { 204 self.html('0'); 205 self.waypoint(function(direction) { 206 if( !self.hasClass('completed') ){ 207 var from = self.data('from'); 208 var to = self.data('to'); 209 var interval = self.data('interval'); 210 self.numinate({ 211 format: '%counter%', 212 from: from, 213 to: to, 214 runningInterval: 2000, 215 stepUnit: interval, 216 onComplete: function(elem) { 217 self.addClass('completed'); 218 } 219 }); 220 } 221 }, { offset:'85%' }); 222 } else { 223 if( animation == 'animateWidth' ) { 224 self.css('width', self.data("width")); 225 } 226 } 227 }); 228 229 230 231/*------------------------------------------------------------------------------*/ 232/* Skillbar 233/*------------------------------------------------------------------------------*/ 234 235 $('.ttm-progress-bar').each(function() { 236 $(this).find('.progress-bar').width(0); 237 }); 238 239 $('.ttm-progress-bar').each(function() { 240 241 $(this).find('.progress-bar').animate({ 242 width: $(this).attr('data-percent') 243 }, 2000); 244 }); 245 246 247 // Part of the code responsible for loading percentages: 248 249 $('.progress-bar-percent[data-percentage]').each(function () { 250 251 var progress = $(this); 252 var percentage = Math.ceil($(this).attr('data-percentage')); 253 254 $({countNum: 0}).animate({countNum: percentage}, { 255 duration: 2000, 256 easing:'linear', 257 step: function() { 258 // What todo on every count 259 var pct = ''; 260 if(percentage === "0"){ 261 pct = Math.floor(this.countNum) + '%'; 262 }else{ 263 pct = Math.floor(this.countNum+1) + '%'; 264 } 265 progress.text(pct); 266 } 267 }); 268 }); 269 270 271 jQuery(".ttm-circle-box").each(function () { 272 273 var circle_box = jQuery(this); 274 var fill_val = circle_box.data("fill"); 275 var emptyFill_val = circle_box.data("emptyfill"); 276 var thickness_val = circle_box.data("thickness"); 277 var linecap_val = circle_box.data("linecap") 278 var fill_gradient = circle_box.data("gradient"); 279 var startangle_val = (-Math.PI / 4) * 1.5; 280 if (fill_gradient != "") { 281 fill_gradient = fill_gradient.split("|"); 282 fill_val = { gradient: [fill_gradient[0], fill_gradient[1]] }; 283 } 284 if (typeof jQuery.fn.circleProgress == "function") { 285 var digit = circle_box.data("digit"); 286 var before = circle_box.data("before"); 287 var after = circle_box.data("after"); 288 var digit = Number(digit); 289 var short_digit = digit / 100; 290 var size_val = circle_box.data("size"); 291 jQuery(".ttm-circle", circle_box)
292 .circleProgress({ value: 0, duration: 8000, size: size_val, startAngle: startangle_val, 293 thickness: thickness_val, linecap:linecap_val, emptyFill: emptyFill_val, fill: fill_val }) 294 .on("circle-animation-progress", function (event, progress, stepValue) { 295 296 circle_box.find(".ttm-fid-number").html(before + Math.round(stepValue * 100) + after); 297 }); 298 } 299 circle_box.waypoint( 300 function (direction) { 301 302 if (!circle_box.hasClass("completed")) { 303 if (typeof jQuery.fn.circleProgress == "function") { 304 jQuery(".ttm-circle", circle_box).circleProgress({ value: short_digit }); 305 } 306 circle_box.addClass("completed"); 307 } 308 }, 309 { offset: "90%" } 310 ); 311 }); 312 313 314 jQuery( document ).ready(function($) { aqovo_logMarginPadding_content();}); 315 function aqovo_logMarginPadding_content(){ 316 jQuery(".ttm-expandcontent-yes").each(function () { 317 var ttm_column_div = ''; 318 var scrren_size = jQuery(window).width(); 319 var box_size = jQuery(this).parent().width(); 320 var extra_size = (scrren_size - box_size) / 2; 321 322 if (jQuery(this).hasClass('ttm-right-span')) { 323 ttm_column_div = ', .ttm-expandcontent_column > .ttm-expandcontent_wrapper '; 324 jQuery('.ttm-expandcontent_column > div' + ttm_column_div, jQuery(this)).css('margin-right', '-' + extra_size + 'px'); 325 } else if (jQuery(this).hasClass('ttm-left-span')) { 326 ttm_column_div = ', .ttm-expandcontent_column > .ttm-expandcontent_wrapper '; 327 jQuery('.ttm-expandcontent_column > div' + ttm_column_div, jQuery(this)).css('margin-left', '-' + extra_size + 'px'); 328 } 329 330 }); 331 }jQuery(window).resize(function() {aqovo_logMarginPadding_content(); }); 332 333 334/*------------------------------------------------------------------------------*/ 335/* Tab 336/*------------------------------------------------------------------------------*/ 337 338 $('.ttm-tabs > .tabs').children('li').on('click', function(e) { 339 340 var tab = $(this).closest('.ttm-tabs > .tabs > .tab'), 341 342 index = $(this).closest('.ttm-tabs > .tabs > li').index(); 343 344 $(this).parents('.ttm-tabs').children('.tabs').children('li.active ').removeClass('active'); 345 346 $(this).addClass('active'); 347 $(this).addClass('active').parents('.ttm-tabs').children('.content-tab').find('.content-inner').not('.content-inner:eq(' + index + ')').slideUp(); 348 $(this).addClass('active').parents('.ttm-tabs').children('.content-tab').find('.content-inner:eq(' + index + ')').slideDown(); 349 350 e.preventDefault(); 351 }); 352 353 354/*------------------------------------------------------------------------------*/ 355/* Accordion 356/*------------------------------------------------------------------------------*/ 357 358 var allPanels = $('.accordion > .toggle').children('.toggle-content').hide(); 359 360 $('.toggle-title').on('click',function(e) { 361 362 e.preventDefault(); 363 var $this = $(this); 364 $this.parent().parent().find('.toggle .toggle-title a').removeClass('active'); 365 366 if ($this.next().hasClass('show')) { 367 368 $this.next().removeClass('show'); 369 $this.next().slideUp('easeInExpo'); 370 371 } else { 372 $this.parent().parent().find('.toggle .toggle-content').removeClass('show'); 373 $this.parent().parent().find('.toggle .toggle-content').slideUp('easeInExpo'); 374 $this.next().toggleClass('show'); 375 $this.next().removeClass('show'); 376 $this.next().slideToggle('easeInExpo'); 377 $this.next().parent().children().children().addClass('active'); 378 379 } 380 381 }); 382 383 384 385/*------------------------------------------------------------------------------*/ 386/* Isotope 387/*------------------------------------------------------------------------------*/ 388 389 $(function () { 390 391 if ( $().isotope ) { 392 var $container = $('.isotope-project'); 393 $container.imagesLoaded(function(){ 394 $container.isotope({ 395 itemSelector: '', 396 transitionDuration: '1s', 397 }); 398 }); 399 400 $('.portfolio-filter li').on('click',function() { 401 var selector = $(this).find("a").attr('data-filter'); 402 $('.portfolio-filter li').removeClass('active'); 403 $(this).addClass('active'); 404 $container.isotope({ filter: selector }); 405 return false;
406 }); 407 }; 408 409 }); 410 411 412 413/*------------------------------------------------------------------------------*/ 414/* Prettyphoto 415/*------------------------------------------------------------------------------*/ 416 $(function () { 417 418 // Normal link 419 jQuery('a[href*=".jpg"], a[href*=".jpeg"], a[href*=".png"], a[href*=".gif"]').each(function(){ 420 if( jQuery(this).attr('target')!='_blank' && !jQuery(this).hasClass('prettyphoto') ){ 421 var attr = $(this).attr('rel'); 422 if (typeof attr !== typeof undefined && attr !== false && attr!='prettyPhoto' ) { 423 jQuery(this).attr('data-rel','prettyPhoto'); 424 } 425 } 426 }); 427 428 jQuery('a[data-rel^="prettyPhoto"]').prettyPhoto(); 429 jQuery('a.ttm_prettyphoto').prettyPhoto(); 430 jQuery('a[rel^="prettyPhoto"]').prettyPhoto(); 431 }); 432 433 434 $(window).on('load', function(){ 435 436 function gridMasonry(){ 437 var grid = $(".masonry-grid") 438 if( grid.length ){ 439 440 grid.isotope({ 441 itemSelector: '.masonry-grid-item', 442 percentPosition: true, 443 layoutMode: 'masonry', 444 masonry: { 445 columnWidth: '.grid-sizer', 446 }, 447 }); 448 449 } 450 } 451 gridMasonry(); 452}); 453 454/*------------------------------------------------------------------------------*/ 455/* Slick_slider 456/*------------------------------------------------------------------------------*/ 457 $(".slick_slider").slick({ 458 speed: 1000, 459 infinite: true, 460 arrows: false, 461 dots: false, 462 autoplay: false, 463 centerMode : false, 464 465 responsive: [{ 466 467 breakpoint: 1360, 468 settings: { 469 slidesToShow: 3, 470 slidesToScroll: 3 471 } 472 }, 473 { 474 breakpoint: 1024, 475 settings: { 476 slidesToShow: 3, 477 slidesToScroll: 3 478 } 479 }, 480 { 481 breakpoint: 680, 482 settings: { 483 slidesToShow: 2, 484 slidesToScroll: 2 485 } 486 }, 487 { 488 breakpoint: 575, 489 settings: { 490 slidesToShow: 1, 491 slidesToScroll: 1 492 } 493 }] 494 }); 495 496 497/*------------------------------------------------------------------------------*/ 498/* Back to top 499/*------------------------------------------------------------------------------*/ 500 501 // ===== Scroll to Top ==== 502 jQuery('#totop').hide(); 503 504 $(window).on("scroll",function(){ 505 if (jQuery(this).scrollTop() >= 500) { // If page is scrolled more than 50px 506 jQuery('#totop').fadeIn(200); // Fade in the arrow 507 jQuery('#totop').addClass('top-visible'); 508 } else { 509 jQuery('#totop').fadeOut(200); // Else fade out the arrow 510 jQuery('#totop').removeClass('top-visible'); 511 } 512 }); 513 514 jQuery('#totop').on("click",function() { // When arrow is clicked 515 jQuery('body,html').animate({ 516 scrollTop : 0 // Scroll to top of body 517 }, 500); 518 return false; 519 }); 520 521 522 523}); 524 525/*------------------------------------------------------------------------------*/ 526/* support-buy 527/*------------------------------------------------------------------------------*/ 528 529$(document).ready(function() { 530 var e = '<div class="prt_floting_customsett">'+ 531 '<a href="https://support.preyantechnosys.com/" class="tmtheme_fbar_icons"><i class="fa fa-headphones"></i><span>Support</span></a>'+ 532 '<a href="https://preyantechnosys.com/" class="tmtheme_fbar_icons"><i class="themifyicon themifyicon ti-pencil"></i><span>Customization</span></a>'+ 533 '<a href="https://1.envato.market/LP2bzO" class="tmtheme_fbar_icons"><i class="themifyicon ti-shopping-cart"></i><span class="buy_link">Buy<span></span></span></a>'+ 534 '<div class="clearfix"></div>'+ 535 '</div>'; 536 537 $('body').append(e); 538}); 539 540// Mobile menu JS 541 542$(document).ready(function () { 543 $(".mi-hamburger .ham").click(function () { 544 $(".mi-menu").addClass("active"); 545 $("body").css("overflow", "hidden"); 546 }); 547 548 $(".mi-hamburger .cross").click(function () { 549 $(".mi-menu").removeClass("active"); 550 $("body").css("overflow", "initial"); 551 }); 552 553 $(".mi-has-child").append("<div class='mob-drop-down'></div>"); 554 $(".mi-has-grand-child").append("<div class='mob-drop-down'></div>"); 555 556 $(".mob-drop-down").click(function () { 557 $(this).toggleClass("acti"); 558 $(this).prev().slideToggle(); 559 $(this).prev().toggleClass("ope-ul"); 560 $(this).parent().toggleClass("ope-li"); 561 $(this).parent().siblings("li").removeClass("ope-li"); 562 $(this).parent().siblings("li").children("ul").slideUp(); 563 $(this).parent().siblings("li").children("ul").removeClass("ope-ul"); 564 $(this).parent().siblings("li").children(".mob-drop-down").removeClass("acti"); 565 }); 566});
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.