1/* =================================================================== 2 3 Author : Valid Theme 4 Template Name : Tanda - IT Solutions Template 5 Version : 1.0 6 7* ================================================================= */ 8 9(function($) { 10 "use strict"; 11 12 $(document).on('ready', function() { 13 14 15 /* ================================================== 16 # Wow Init 17 ===============================================*/ 18 var wow = new WOW({ 19 boxClass: 'wow', // animated element css class (default is wow) 20 animateClass: 'animated', // animation css class (default is animated) 21 offset: 0, // distance to the element when triggering the animation (default is 0) 22 mobile: true, // trigger animations on mobile devices (default is true) 23 live: true // act on asynchronously loaded content (default is true) 24 }); 25 wow.init(); 26 27 28 /* ================================================== 29 # Tooltip Init 30 ===============================================*/ 31 $('[data-toggle="tooltip"]').tooltip(); 32 33 34 35 /* ================================================== 36 # Smooth Scroll 37 ===============================================*/ 38 $("body").scrollspy({ 39 target: ".navbar-collapse", 40 offset: 200 41 }); 42 $('ul.nav>li>a').on('click', function(event) { 43 var $anchor = $(this); 44 var headerH = '75'; 45 $('html, body').stop().animate({ 46 scrollTop: $($anchor.attr('href')).offset().top - headerH + "px" 47 }, 1500, 'easeInOutExpo'); 48 event.preventDefault(); 49 }); 50 51 52 /* ================================================== 53 # Banner Animation 54 ===============================================*/ 55 function doAnimations(elems) { 56 //Cache the animationend event in a variable 57 var animEndEv = 'webkitAnimationEnd animationend'; 58 elems.each(function() { 59 var $this = $(this), 60 $animationType = $this.data('animation'); 61 $this.addClass($animationType).one(animEndEv, function() { 62 $this.removeClass($animationType); 63 }); 64 }); 65 } 66 67 //Variables on page load 68 var $immortalCarousel = $('.animate_text'), 69 $firstAnimatingElems = $immortalCarousel.find('.item:first').find("[data-animation ^= 'animated']"); 70 //Initialize carousel 71 $immortalCarousel.carousel(); 72 //Animate captions in first slide on page load 73 doAnimations($firstAnimatingElems); 74 //Other slides to be animated on carousel slide event 75 $immortalCarousel.on('slide.bs.carousel', function(e) { 76 var $animatingElems = $(e.relatedTarget).find("[data-animation ^= 'animated']"); 77 doAnimations($animatingElems); 78 }); 79 80 81 /* ================================================== 82 # Equal Height Init 83 ===============================================*/ 84 $(window).on('resize', function() { 85 $(".equal-height").equalHeights(); 86 }); 87 88 $(".equal-height").equalHeights().find("img, iframe, object").on('load', function() { 89 $(".equal-height").equalHeights(); 90 }); 91 92 93 /* ================================================== 94 # Youtube Video Init 95 ===============================================*/ 96 $('.player').mb_YTPlayer(); 97 98 99 /* ================================================== 100 # imagesLoaded active 101 ===============================================*/ 102 $('#portfolio-grid,.blog-masonry').imagesLoaded(function() { 103 104 /* Filter menu */ 105 $('.mix-item-menu').on('click', 'button', function() { 106 var filterValue = $(this).attr('data-filter'); 107 $grid.isotope({ 108 filter: filterValue 109 }); 110 }); 111 112 /* filter menu active class */ 113 $('.mix-item-menu button').on('click', function(event) { 114 $(this).siblings('.active').removeClass('active'); 115 $(this).addClass('active'); 116 event.preventDefault(); 117 }); 118 119 /* Filter active */
120 var $grid = $('#portfolio-grid').isotope({ 121 itemSelector: '.pf-item', 122 percentPosition: true, 123 masonry: { 124 columnWidth: '.pf-item', 125 } 126 }); 127 128 /* Filter active */ 129 $('.blog-masonry').isotope({ 130 itemSelector: '.blog-item', 131 percentPosition: true, 132 masonry: { 133 columnWidth: '.blog-item', 134 } 135 }); 136 137 }); 138 139 140 /* ================================================== 141 # Fun Factor Init 142 ===============================================*/ 143 $('.timer').countTo(); 144 $('.fun-fact').appear(function() { 145 $('.timer').countTo(); 146 }, { 147 accY: -100 148 }); 149 150 151 /* ================================================== 152 # Magnific popup init 153 ===============================================*/ 154 $(".popup-link").magnificPopup({ 155 type: 'image', 156 // other options 157 }); 158 159 $(".popup-gallery").magnificPopup({ 160 type: 'image', 161 gallery: { 162 enabled: true 163 }, 164 // other options 165 }); 166 167 $(".popup-youtube, .popup-vimeo, .popup-gmaps").magnificPopup({ 168 type: "iframe", 169 mainClass: "mfp-fade", 170 removalDelay: 160, 171 preloader: false, 172 fixedContentPos: false 173 }); 174 175 $('.magnific-mix-gallery').each(function() { 176 var $container = $(this); 177 var $imageLinks = $container.find('.item'); 178 179 var items = []; 180 $imageLinks.each(function() { 181 var $item = $(this); 182 var type = 'image'; 183 if ($item.hasClass('magnific-iframe')) { 184 type = 'iframe'; 185 } 186 var magItem = { 187 src: $item.attr('href'), 188 type: type 189 }; 190 magItem.title = $item.data('title'); 191 items.push(magItem); 192 }); 193 194 $imageLinks.magnificPopup({ 195 mainClass: 'mfp-fade', 196 items: items, 197 gallery: { 198 enabled: true, 199 tPrev: $(this).data('prev-text'), 200 tNext: $(this).data('next-text') 201 }, 202 type: 'image', 203 callbacks: { 204 beforeOpen: function() { 205 var index = $imageLinks.index(this.st.el); 206 if (-1 !== index) { 207 this.goTo(index); 208 } 209 } 210 } 211 }); 212 }); 213 214 215 /* ================================================== 216 # Testimonial Carousel 217 ===============================================*/ 218 $('.testimonial-carousel').owlCarousel({ 219 loop: false, 220 margin: 50, 221 nav: false, 222 navText: [ 223 "<i class='fa fa-angle-left'></i>", 224 "<i class='fa fa-angle-right'></i>" 225 ], 226 dots: true, 227 autoplay: false, 228 responsive: { 229 0: { 230 items: 1 231 }, 232 800: { 233 items: 1 234 }, 235 1200: { 236 items: 2 237 } 238 } 239 }); 240 241 242 /* ================================================== 243 # Case Carousel 244 ===============================================*/ 245 $('.case-carousel').owlCarousel({ 246 loop: false, 247 margin: 30, 248 nav: true, 249 navText: [ 250 "<i class='fa fa-angle-left'></i>", 251 "<i class='fa fa-angle-right'></i>" 252 ], 253 dots: false, 254 autoplay: true, 255 responsive: { 256 0: { 257 items: 1 258 }, 259 800: { 260 items: 2 261 }, 262 1000: { 263 items: 3 264 } 265 } 266 }); 267 268 269 /* ================================================== 270 # Services Carousel
271 ===============================================*/ 272 $('.services-carousel').owlCarousel({ 273 loop: false, 274 margin: 30, 275 nav: false, 276 navText: [ 277 "<i class='fa fa-angle-left'></i>", 278 "<i class='fa fa-angle-right'></i>" 279 ], 280 dots: true, 281 autoplay: true, 282 responsive: { 283 0: { 284 items: 1 285 }, 286 800: { 287 items: 2 288 }, 289 1000: { 290 items: 3, 291 } 292 } 293 }); 294 295 296 /* ================================================== 297 # Clients Carousel 298 ===============================================*/ 299 $('.clients-carousel').owlCarousel({ 300 loop: false, 301 margin: 80, 302 nav: false, 303 navText: [ 304 "<i class='fa fa-angle-left'></i>", 305 "<i class='fa fa-angle-right'></i>" 306 ], 307 dots: false, 308 autoplay: true, 309 responsive: { 310 0: { 311 items: 2 312 }, 313 600: { 314 items: 3 315 }, 316 1000: { 317 items: 5 318 } 319 } 320 }); 321 322 323 /* ================================================== 324 Preloader Init 325 ===============================================*/ 326 jQuery(".site-preloader").fadeOut("slow", function () { 327 $(this).remove(); 328 }); 329 330 /* ================================================== 331 Nice Select Init 332 ===============================================*/ 333 $('select').niceSelect(); 334 335 336 /* ================================================== 337 Contact Form Validations 338 ================================================== */ 339 $('.contact-form').each(function() { 340 var formInstance = $(this); 341 formInstance.submit(function() { 342 343 var action = $(this).attr('action'); 344 345 $("#message").slideUp(750, function() { 346 $('#message').hide(); 347 348 $('#submit') 349 .after('<img src="assets/img/ajax-loader.gif" class="loader" />') 350 .attr('disabled', 'disabled'); 351 352 $.post(action, { 353 name: $('#name').val(), 354 email: $('#email').val(), 355 phone: $('#phone').val(), 356 comments: $('#comments').val() 357 }, 358 function(data) { 359 document.getElementById('message').innerHTML = data; 360 $('#message').slideDown('slow'); 361 $('.contact-form img.loader').fadeOut('slow', function() { 362 $(this).remove() 363 }); 364 $('#submit').removeAttr('disabled'); 365 } 366 ); 367 }); 368 return false; 369 }); 370 }); 371 372 }); // end document ready function 373})(jQuery); // End 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.