1/* 2 Project author: ModelTheme 3 File name: Custom JS 4*/ 5 6(function ($) { 7 'use strict'; 8 9 /* page preloader */ 10 jQuery(window).load(function(){ 11 jQuery( '.linify_preloader_holder' ).fadeOut( 1000, function() { 12 jQuery( this ).fadeOut(); 13 }); 14 }); 15 16 jQuery( ".compare.button" ).on( "click", function() { 17 setTimeout( function(){ 18 jQuery(".compare.button.added").empty(); 19 console.log('Empty'); 20 },3000 ); 21 }); 22 23 jQuery(function () { 24 jQuery('.share-button').share({ 25 flyout: 'top center' 26 }); 27 }); 28 29 30 // 9th MENU Toggle - Hamburger 31 var toggles = document.querySelectorAll(".c-hamburger"); 32 33 for (var i = toggles.length - 1; i >= 0; i--) { 34 var toggle = toggles[i]; 35 toggleHandler(toggle); 36 }; 37 38 function toggleHandler(toggle) { 39 toggle.addEventListener( "click", function(e) { 40 e.preventDefault(); 41 (this.classList.contains("is-btn-active") === true) ? this.classList.remove("is-btn-active") : this.classList.add("is-btn-active"); 42 }); 43 } 44 45 46 jQuery(document).ready(function() { 47 48 jQuery(".search_products").on({ 49 mouseenter: function () { 50 //stuff to do on mouse enter 51 jQuery('.header_search_form').addClass('visibile_contact'); 52 }, 53 mouseleave: function () { 54 //stuff to do on mouse leave 55 jQuery('.header_search_form').removeClass('visibile_contact'); 56 } 57 }); 58 59 }); 60 61 62 $(document).ready(function() { 63 64 jQuery(".shop_cart").on({ 65 mouseenter: function () { 66 //stuff to do on mouse enter 67 jQuery('.header_mini_cart').addClass('visible_cart'); 68 }, 69 mouseleave: function () { 70 //stuff to do on mouse leave 71 jQuery('.header_mini_cart').removeClass('visible_cart'); 72 } 73 }); 74 75 jQuery(".header_mini_cart").on({ 76 mouseenter: function () { 77 //stuff to do on mouse enter 78 jQuery(this).addClass('visible_cart'); 79 }, 80 mouseleave: function () { 81 //stuff to do on mouse leave 82 jQuery(this).removeClass('visible_cart'); 83 } 84 }); 85 86 if (jQuery(window).width() < 760) { 87 88 jQuery( ".menu-item-has-children" ).on( "click", function() { 89 jQuery(this).find('.sub-menu').first('.sub-menu').toggle('shown'); 90 jQuery('.sub-menu.shown').removeClass('.shown'); 91 }); 92 93 } 94 95 //Begin: Validate and Submit contact form via Ajax 96 jQuery("#contact_form").validate({ 97 //Ajax validation rules 98 rules: { 99 user_name: { 100 required: true, 101 minlength: 2 102 }, 103 user_message: { 104 required: true, 105 minlength: 10 106 }, 107 user_subject: { 108 required: true, 109 minlength: 5 110 }, 111 user_email: { 112 required: true, 113 email: true 114 } 115 }, 116 //Ajax validation messages 117 messages: { 118 user_name: { 119 required: "Please enter a name", 120 minlength: "Your name must consist of at least 2 characters" 121 }, 122 user_message: { 123 required: "Please enter a message", 124 minlength: "Your message must consist of at least 10 characters" 125 }, 126 user_subject: { 127 required: "Please provide a subject", 128 minlength: "Your subject must be at least 5 characters long" 129 }, 130 user_email: "Please enter a valid email address" 131 }, 132 //Submit via Ajax Form 133 submitHandler: function() { 134 jQuery('#contact_form').ajaxSubmit(); 135 jQuery('.success_message').fadeIn('slow'); 136 } 137 });
138 //End: Validate and Submit contact form via Ajax 139 140 141 142 //Begin: Validate and Submit contact form 2 via Ajax 143 jQuery("#contact_form2").validate({ 144 //Ajax validation rules 145 rules: { 146 user_name: { 147 required: true, 148 minlength: 2 149 }, 150 user_message: { 151 required: true, 152 minlength: 10 153 }, 154 user_subject: { 155 required: true, 156 minlength: 5 157 }, 158 user_email: { 159 required: true, 160 email: true 161 }, 162 user_phone: { 163 required: true, 164 minlength: 6, 165 number: true 166 }, 167 user_city: { 168 required: true 169 } 170 }, 171 //Ajax validation messages 172 messages: { 173 user_name: { 174 required: "Please enter a name", 175 minlength: "Your name must consist of at least 2 characters" 176 }, 177 user_message: { 178 required: "Please enter a message", 179 minlength: "Your message must consist of at least 10 characters" 180 }, 181 user_subject: { 182 required: "Please provide a subject", 183 minlength: "Your subject must be at least 5 characters long" 184 }, 185 user_phone: { 186 required: "Please provide a phone number", 187 minlength: "Your phone must be at least 6 numbers long", 188 number: "You must enter a number" 189 }, 190 user_city: { 191 required: "Please provide a city" 192 }, 193 user_email: { 194 required: "Please provide a email", 195 email: "Please enter a valid email address" 196 } 197 } 198 }); 199 //End: Validate and Submit contact form via Ajax 200 201 //Begin: Contact form overlay 202 jQuery(document).ready(function() { 203 jQuery( ".see_map_button" ).on( "click", function() { 204 jQuery( "#map_wrapper_overlay" ).fadeOut('slow'); 205 }); 206 }); 207 //End: Contact form overlay 208 209 //Begin: Sticky Head 210 jQuery(function(){ 211 if (jQuery('body').hasClass('is_nav_sticky')) { 212 jQuery(window).resize(function() { 213 if (jQuery(window).width() <= 768) { 214 } else { 215 jQuery("#modeltheme-main-head").sticky({ 216 topSpacing:0 217 }); 218 } 219 }); 220 if (jQuery(window).width() >= 768) { 221 jQuery("#modeltheme-main-head").sticky({ 222 topSpacing:0 223 }); 224 } 225 } 226 }); 227 228 229 if ( jQuery( ".woocommerce_categories" ).length ) { 230 231 232 jQuery( ".category a" ).on( "click", function() { 233 var attr = jQuery(this).attr("class"); 234 jQuery(".products_by_category").removeClass("active"); 235 jQuery(attr).addClass("active"); 236 jQuery('.category').removeClass("active"); 237 jQuery(this).parent('.category').addClass("active"); 238 }); 239 jQuery('.products_category .products_by_category:first').addClass("active"); 240 jQuery('.categories_shortcode .category:first').addClass("active"); 241 } 242 //Begin: Search Form 243 if ( jQuery( "#modeltheme-search" ).length ) { 244 new UISearch( document.getElementById( 'modeltheme-search' ) ); 245 } 246 //End: Search Form 247 248 249 //Begin: Parallax 250 jQuery('.parralax-background').parallax("50%", 0.5); 251 //End: Parallax 252 253 254 255 jQuery( ".compare.button" ).on( "click", function() { 256 jQuery( ".compare.button.added a" ).html(""); 257 }); 258 259 260 /*Begin: Testimonials slider*/ 261 jQuery(".quotes-slider").owlCarousel({ 262 navigation : false, // Show next and prev buttons 263 pagination : false, 264 autoPlay : true, 265 rewindNav : true, 266 slideSpeed : 700, 267 paginationSpeed : 700, 268 singleItem : true 269 }); 270 271 jQuery(".quotes-container").owlCarousel({ 272 navigation : false, // Show next and prev buttons 273 pagination : false, 274 autoPlay : true, 275 slideSpeed : 700, 276 paginationSpeed : 700, 277 singleItem : true 278 }); 279 jQuery(".testimonials-container").owlCarousel({ 280 navigation : false, // Show next and prev buttons 281 pagination : false, 282 autoPlay : true, 283 slideSpeed : 700, 284 paginationSpeed : 700, 285 itemsCustom : [ 286 [0, 1], 287 [450, 1], 288 [600, 2], 289 [700, 2], 290 [1000, 2], 291 [1200, 2], 292 [1400, 2], 293 [1600, 2] 294 ] 295 }); 296 jQuery(".testimonials-container-1").owlCarousel({ 297 navigation : false, // Show next and prev buttons 298 pagination : false, 299 autoPlay : true, 300 slideSpeed : 700, 301 paginationSpeed : 700, 302 itemsCustom : [ 303 [0, 1], 304 [450, 1], 305 [600, 1], 306 [700, 1], 307 [1000, 1], 308 [1200, 1], 309 [1400, 1], 310 [1600, 1] 311 ] 312 }); 313 jQuery(".testimonials-container-2").owlCarousel({ 314 navigation : false, // Show next and prev buttons 315 pagination : false, 316 autoPlay : true, 317 slideSpeed : 700, 318 paginationSpeed : 700, 319 itemsCustom : [ 320 [0, 1], 321 [450, 1], 322 [600, 2], 323 [700, 2], 324 [1000, 2], 325 [1200, 2], 326 [1400, 2], 327 [1600, 2] 328 ] 329 }); 330 jQuery(".testimonials-container-3").owlCarousel({ 331 navigation : false, // Show next and prev buttons 332 pagination : false, 333 autoPlay : true, 334 slideSpeed : 700, 335 paginationSpeed : 700, 336 itemsCustom : [ 337 [0, 1], 338 [450, 1], 339 [600, 2], 340 [700, 2], 341 [1000, 3], 342 [1200, 3], 343 [1400, 3], 344 [1600, 3] 345 ] 346 }); 347 /*End: Testimonials slider*/ 348 jQuery(".testimonials-container-3").owlCarousel({ 349 navigation : false, // Show next and prev buttons 350 pagination : false, 351 autoPlay : true, 352 slideSpeed : 700, 353 paginationSpeed : 700, 354 itemsCustom : [ 355 [0, 1], 356 [450, 1], 357 [600, 2], 358 [700, 2], 359 [1000, 3], 360 [1200, 3], 361 [1400, 3], 362 [1600, 3] 363 ] 364 }); 365 /*Begin: Pastors slider*/ 366 jQuery(".pastor_slider").owlCarousel({ 367 navigation : false, // Show next and prev buttons 368 pagination : false, 369 autoPlay : true, 370 slideSpeed : 700, 371 paginationSpeed : 700, 372 itemsCustom : [ 373 [0, 1], 374 [450, 1], 375 [600, 2], 376 [700, 2], 377 [1000, 4], 378 [1200, 4], 379 [1400, 4], 380 [1600, 4] 381 ] 382 }); 383 /*End: Pastors slider*/ 384 /*Begin: Clients slider*/ 385 jQuery(".categories_shortcode").owlCarousel({ 386 navigation : false, // Show next and prev buttons 387 pagination : false, 388 autoPlay : false, 389 slideSpeed : 700, 390 paginationSpeed : 700, 391 navigationText : ["<i class='fa fa-arrow-left'></i>","<i class='fa fa-arrow-right'></i>"], 392 itemsCustom : [ 393 [0, 1], 394 [450, 2], 395 [600, 2], 396 [700, 5], 397 [1000, 5], 398 [1200, 5], 399 [1400, 5], 400 [1600, 5] 401 ] 402 }); 403 /*Begin: Products by category*/ 404 jQuery(".clients-container").owlCarousel({ 405 navigation : false, // Show next and prev buttons 406 pagination : false, 407 autoPlay : true, 408 slideSpeed : 700, 409 paginationSpeed : 700, 410 itemsCustom : [ 411 [0, 1], 412 [450, 2], 413 [600, 2], 414 [700, 3], 415 [1000, 5], 416 [1200, 5], 417 [1400, 5], 418 [1600, 5] 419 ] 420 }); 421 /*Begin: Portfolio single slider*/ 422 jQuery(".portfolio_thumbnails_slider").owlCarousel({ 423 navigation : true, // Show next and prev buttons 424 pagination : true, 425 autoPlay : false, 426 slideSpeed : 700, 427 paginationSpeed : 700, 428 navigationText : ["",""], 429 singleItem : true 430 }); 431 /*End: Portfolio single slider*/ 432 /*Begin: Testimonials slider*/ 433 jQuery(".post_thumbnails_slider").owlCarousel({ 434 navigation : false, // Show next and prev buttons 435 pagination : false, 436 autoPlay : false, 437 slideSpeed : 700, 438 paginationSpeed : 700, 439 singleItem : true 440 }); 441 var owl = jQuery(".post_thumbnails_slider"); 442 jQuery( ".next" ).on( "click", function() { 443 owl.trigger('owl.next'); 444 }) 445 jQuery( ".prev" ).on( "click", function() { 446 owl.trigger('owl.prev'); 447 }) 448 /*End: Testimonials slider*/ 449 450 /*Begin: Testimonials slider*/ 451 jQuery(".testimonials_slider").owlCarousel({ 452 navigation : false, // Show next and prev buttons 453 pagination : true, 454 autoPlay : false, 455 slideSpeed : 700, 456 paginationSpeed : 700, 457 singleItem : true 458 }); 459 /*End: Testimonials slider*/ 460 /* Animate */ 461 jQuery('.animateIn').animateIn(); 462 // browser window scroll (in pixels) after which the "back to top" link is shown
463 var offset = 300, 464 //browser window scroll (in pixels) after which the "back to top" link opacity is reduced 465 offset_opacity = 1200, 466 //duration of the top scrolling animation (in ms) 467 scroll_top_duration = 700, 468 //grab the "back to top" link 469 $back_to_top = jQuery('.back-to-top'); 470 //hide or show the "back to top" link 471 jQuery(window).scroll(function(){ 472 ( jQuery(this).scrollTop() > offset ) ? $back_to_top.addClass('modeltheme-is-visible') : $back_to_top.removeClass('modeltheme-is-visible modeltheme-fade-out'); 473 if( jQuery(this).scrollTop() > offset_opacity ) { 474 $back_to_top.addClass('modeltheme-fade-out'); 475 } 476 }); 477 //smooth scroll to top 478 $back_to_top.on('click', function(event){ 479 event.preventDefault(); 480 $('body,html').animate({ 481 scrollTop: 0 , 482 }, scroll_top_duration 483 ); 484 }); 485 486 if (jQuery('body .lms-course-price .learn-press-message').length){ 487 jQuery("body .lms-course-price .learn-press-message").prependTo(".course-landing-summary"); 488 } 489 490 //Begin: Skills 491 jQuery('.statistics').appear(function() { 492 jQuery('.percentage').each(function(){ 493 var dataperc = jQuery(this).attr('data-perc'); 494 jQuery(this).find('.skill-count').delay(6000).countTo({ 495 from: 0, 496 to: dataperc, 497 speed: 5000, 498 refreshInterval: 100 499 }); 500 }); 501 }); 502 //End: Skills 503 /* Youtube Video */ 504 if (jQuery('.player').length){ 505 jQuery(".player").mb_YTPlayer({}); 506 jQuery('.player').on("YTPStart",function(){ 507 jQuery('.video-bg').animate({opacity: 1}, 5000,function(){}); 508 }); 509 } 510 }) 511} (jQuery) ) 512 513 514jQuery(document).ready(function() { 515 jQuery(".rippler").rippler({ 516 effectClass : 'rippler-effect' 517 ,effectSize : 16 // Default size (width & height) 518 ,addElement : 'div' // e.g. 'svg'(feature) 519 ,duration : 400 520 }); 521}); 522 523//revolution slider buttons delete effect 524jQuery('.rev_slider_wrapper .rev_slider .modeltheme_button').removeClass('animateIn').removeClass('animated');
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.