1/* =================================================================== 2 3 Author : Valid Template 4 Template Name : Edocom - Education & LMS 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 # Smooth Scroll 30 ===============================================*/ 31 $("body").scrollspy({ 32 target: ".navbar-collapse", 33 offset: 200 34 }); 35 $('a.smooth-menu').on('click', function(event) { 36 var $anchor = $(this); 37 var headerH = '75'; 38 $('html, body').stop().animate({ 39 scrollTop: $($anchor.attr('href')).offset().top - headerH + "px" 40 }, 1500, 'easeInOutExpo'); 41 event.preventDefault(); 42 }); 43 44 45 /* ================================================== 46 # Banner Animation 47 ===============================================*/ 48 function doAnimations(elems) { 49 //Cache the animationend event in a variable 50 var animEndEv = 'webkitAnimationEnd animationend'; 51 elems.each(function() { 52 var $this = $(this), 53 $animationType = $this.data('animation'); 54 $this.addClass($animationType).one(animEndEv, function() { 55 $this.removeClass($animationType); 56 }); 57 }); 58 } 59 60 //Variables on page load 61 var $immortalCarousel = $('.animate_text'), 62 $firstAnimatingElems = $immortalCarousel.find('.item:first').find("[data-animation ^= 'animated']"); 63 //Initialize carousel 64 $immortalCarousel.carousel(); 65 //Animate captions in first slide on page load 66 doAnimations($firstAnimatingElems); 67 //Other slides to be animated on carousel slide event 68 $immortalCarousel.on('slide.bs.carousel', function(e) { 69 var $animatingElems = $(e.relatedTarget).find("[data-animation ^= 'animated']"); 70 doAnimations($animatingElems); 71 }); 72 73 74 /* ================================================== 75 # Equal Height Init 76 ===============================================*/ 77 $(window).on('resize', function() { 78 $(".equal-height").equalHeights(); 79 }); 80 81 $(".equal-height").equalHeights().find("img, iframe, object").on('load', function() { 82 $(".equal-height").equalHeights(); 83 }); 84 85 86/* ================================================== 87 # imagesLoaded active 88 ===============================================*/ 89 $('#portfolio-grid,.blog-masonry').imagesLoaded(function() { 90 91 /* Filter menu */ 92 $('.mix-item-menu').on('click', 'button', function() { 93 var filterValue = $(this).attr('data-filter'); 94 $grid.isotope({ 95 filter: filterValue 96 }); 97 }); 98 99 /* filter menu active class */ 100 $('.mix-item-menu button').on('click', function(event) { 101 $(this).siblings('.active').removeClass('active'); 102 $(this).addClass('active'); 103 event.preventDefault(); 104 }); 105 106 /* Filter active */ 107 var $grid = $('#portfolio-grid').isotope({ 108 itemSelector: '.pf-item', 109 percentPosition: true, 110 masonry: { 111 columnWidth: '.pf-item', 112 } 113 }); 114 115 /* Filter active */ 116 $('.blog-masonry').isotope({ 117 itemSelector: '.blog-item', 118 percentPosition: true, 119 masonry: { 120 columnWidth: '.blog-item', 121 } 122 }); 123 124 }); 125 126 127 /* ================================================== 128 # Fun Factor Init 129 ===============================================*/ 130 $('.timer').countTo(); 131 $('.fun-fact').appear(function() { 132 $('.timer').countTo(); 133 }, {
134 accY: -100 135 }); 136 137 138 /* ================================================== 139 # Magnific popup init 140 ===============================================*/ 141 $(".popup-link").magnificPopup({ 142 type: 'image', 143 // other options 144 }); 145 146 $(".popup-gallery").magnificPopup({ 147 type: 'image', 148 gallery: { 149 enabled: true 150 }, 151 // other options 152 }); 153 154 $(".popup-youtube, .popup-vimeo, .popup-gmaps").magnificPopup({ 155 type: "iframe", 156 mainClass: "mfp-fade", 157 removalDelay: 160, 158 preloader: false, 159 fixedContentPos: false 160 }); 161 162 $('.magnific-mix-gallery').each(function() { 163 var $container = $(this); 164 var $imageLinks = $container.find('.item'); 165 166 var items = []; 167 $imageLinks.each(function() { 168 var $item = $(this); 169 var type = 'image'; 170 if ($item.hasClass('magnific-iframe')) { 171 type = 'iframe'; 172 } 173 var magItem = { 174 src: $item.attr('href'), 175 type: type 176 }; 177 magItem.title = $item.data('title'); 178 items.push(magItem); 179 }); 180 181 $imageLinks.magnificPopup({ 182 mainClass: 'mfp-fade', 183 items: items, 184 gallery: { 185 enabled: true, 186 tPrev: $(this).data('prev-text'), 187 tNext: $(this).data('next-text') 188 }, 189 type: 'image', 190 callbacks: { 191 beforeOpen: function() { 192 var index = $imageLinks.index(this.st.el); 193 if (-1 !== index) { 194 this.goTo(index); 195 } 196 } 197 } 198 }); 199 }); 200 201 202 /* ================================================== 203 # Campus Carousel 204 ===============================================*/ 205 $('.campus-carousel').owlCarousel({ 206 loop: true, 207 nav: false, 208 dots: true, 209 autoplay: true, 210 items: 1, 211 navText: [ 212 "<i class='fa fa-angle-left'></i>", 213 "<i class='fa fa-angle-right'></i>" 214 ], 215 }); 216 217 218 /* ================================================== 219 # Top Courses Carousel 220 ===============================================*/ 221 $('.top-courses-carousel').owlCarousel({ 222 loop: true, 223 margin: 30, 224 nav: true, 225 navText: [ 226 "<i class='fa fa-angle-left'></i>", 227 "<i class='fa fa-angle-right'></i>" 228 ], 229 dots: false, 230 autoplay: true, 231 responsive: { 232 0: { 233 items: 1 234 }, 235 600: { 236 items: 2 237 }, 238 1000: { 239 items: 2 240 } 241 } 242 }); 243 244 245 $('.top-courses-carousel-modified').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 items: 1, 256 responsive: { 257 0: { 258 items: 1 259 }, 260 600: { 261 items: 2 262 } 263 } 264 265 }); 266 267 /* ================================================== 268 # Top Courses Carousel 269 ===============================================*/ 270 $('.courses-carousel-single-item').owlCarousel({ 271 loop: true, 272 nav: true, 273 dots: false, 274 autoplay: true, 275 items: 1, 276 navText: [ 277 "<i class='fa fa-angle-left'></i>", 278 "<i class='fa fa-angle-right'></i>" 279 ], 280 }); 281 282 /* ================================================== 283 # Courses Carousel
284 ===============================================*/ 285 $('.courses-carousel').owlCarousel({ 286 loop: true, 287 margin: 30, 288 nav: false, 289 navText: [ 290 "<i class='fa fa-angle-left'></i>", 291 "<i class='fa fa-angle-right'></i>" 292 ], 293 dots: true, 294 autoplay: true, 295 responsive: { 296 0: { 297 items: 1 298 }, 299 600: { 300 items: 2 301 }, 302 768: { 303 items: 3 304 } 305 } 306 }); 307 308 309 /* ================================================== 310 # Video Carousel 311 ===============================================*/ 312 $('.video-carousel').owlCarousel({ 313 loop: true, 314 margin: 30, 315 nav: false, 316 navText: [ 317 "<i class='fa fa-angle-left'></i>", 318 "<i class='fa fa-angle-right'></i>" 319 ], 320 dots: true, 321 autoplay: true, 322 responsive: { 323 0: { 324 items: 1 325 }, 326 600: { 327 items: 2 328 }, 329 768: { 330 items: 3 331 }, 332 992: { 333 items: 4 334 } 335 } 336 }); 337 338 339 /* ================================================== 340 # Advisor Carousel 341 ===============================================*/ 342 $('.advisor-carousel').owlCarousel({ 343 loop: true, 344 margin: 30, 345 nav: false, 346 navText: [ 347 "<i class='fa fa-angle-left'></i>", 348 "<i class='fa fa-angle-right'></i>" 349 ], 350 dots: true, 351 autoplay: true, 352 responsive: { 353 0: { 354 items: 1 355 }, 356 600: { 357 items: 2 358 }, 359 768: { 360 items: 3 361 } 362 } 363 }); 364 365 $('.advisor-carousel-modified').owlCarousel({ 366 loop: false, 367 margin: 30, 368 nav: false, 369 navText: [ 370 "<i class='fa fa-angle-left'></i>", 371 "<i class='fa fa-angle-right'></i>" 372 ], 373 dots: true, 374 autoplay: true, 375 responsive: { 376 0: { 377 items: 1 378 }, 379 600: { 380 items: 2 381 }, 382 768: { 383 items: 3 384 } 385 } 386 }); 387 388 389 /* ================================================== 390 # Testimonial Carousel 391 ===============================================*/ 392 $('.testimonial-carousel').owlCarousel({ 393 loop: true, 394 margin: 30, 395 nav: false, 396 navText: [ 397 "<i class='fa fa-angle-left'></i>", 398 "<i class='fa fa-angle-right'></i>" 399 ], 400 dots: true, 401 autoplay: true, 402 responsive: { 403 0: { 404 items: 1 405 }, 406 600: { 407 items: 2 408 }, 409 1000: { 410 items: 2 411 } 412 } 413 }); 414 415 416 /* ================================================== 417 Preloader Init 418 ===============================================*/ 419 $(window).on('load', function() { 420 // Animate loader off screen 421 $(".se-pre-con").fadeOut("slow");; 422 }); 423 424 425 /* ================================================== 426 Countdown Init 427 ===============================================*/ 428 loopcounter('counter-class'); 429 430 431 /* ================================================== 432 Nice Select Init 433 ===============================================*/ 434 // $('select').niceSelect(); 435 436 437 438 /* ================================================== 439 Contact Form Validations 440 ================================================== */ 441 $('.contact-form').each(function() { 442 var formInstance = $(this); 443 formInstance.submit(function() { 444 445 var action = $(this).attr('action'); 446 447 $("#message").slideUp(750, function() { 448 $('#message').hide(); 449 450 $('#submit') 451 .after('<img src="assets/img/ajax-loader.gif" class="loader" />') 452 .attr('disabled', 'disabled'); 453 454 $.post(action, { 455 name: $('#name').val(), 456 email: $('#email').val(), 457 phone: $('#phone').val(), 458 comments: $('#comments').val() 459 }, 460 function(data) { 461 document.getElementById('message').innerHTML = data; 462 $('#message').slideDown('slow'); 463 $('.contact-form img.loader').fadeOut('slow', function() { 464 $(this).remove() 465 }); 466 $('#submit').removeAttr('disabled'); 467 } 468 ); 469 }); 470 return false;
471 }); 472 }); 473 474 }); // end document ready function 475})(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.