1/** 2 * Easy on scroll event listener 3 */ 4const onscroll = (el, listener) => { 5 el.addEventListener('scroll', listener) 6} 7 8const select = (el, all = false) => { 9 el = el.trim(); 10 if (all) { 11 return [...document.querySelectorAll(el)]; 12 } else { 13 return document.querySelector(el); 14 } 15}; 16 17/** 18 * Back to top button 19 */ 20let backtotop = select('.back-to-top') 21if (backtotop) { 22 const toggleBacktotop = () => { 23 if (window.scrollY > 100) { 24 backtotop.classList.add('active') 25 } else { 26 backtotop.classList.remove('active') 27 } 28 } 29 window.addEventListener('load', toggleBacktotop) 30 onscroll(document, toggleBacktotop) 31} 32 33$(".testimonialSpeak").owlCarousel({ 34 margin: 20, 35 loop: true, 36 autoplay: true, 37 autoplayTimeout: 3000, 38 autoplayHoverPause: true, 39 responsive: { 40 0: { 41 items: 1, 42 nav: false 43 }, 44 600: { 45 items: 1, 46 nav: false 47 }, 48 1000: { 49 items: 1, 50 nav: false 51 } 52 } 53}); 54 55 56 57$(".carouselAwardlogs").owlCarousel({ 58 margin: 20, 59 loop: true, 60 autoplay: true, 61 autoplayTimeout: 3000, 62 autoplayHoverPause: true, 63 responsive: { 64 0: { 65 items: 1, 66 nav: false 67 }, 68 600: { 69 items: 1, 70 nav: false 71 }, 72 1000: { 73 items: 4, 74 nav: false 75 } 76 } 77}); 78$(".carouselAwardlogs1").owlCarousel({ 79 margin: 20, 80 loop: true, 81 autoplay: true, 82 autoplayTimeout: 3000, 83 autoplayHoverPause: true, 84 responsive: { 85 0: { 86 items: 1, 87 nav: false 88 }, 89 600: { 90 items: 1, 91 nav: false 92 }, 93 1000: { 94 items: 1, 95 nav: false 96 } 97 } 98}); 99 100 101$(".carouselAcademiclogs-new").owlCarousel({ 102 margin: 20, 103 loop: true, 104 autoplay: true, 105 autoplayTimeout: 3000, 106 autoplayHoverPause: true, 107 responsive: { 108 0: { 109 items: 1, 110 nav: false 111 }, 112 600: { 113 items: 3, 114 nav: false 115 }, 116 1000: { 117 items: 5, 118 nav: false 119 } 120 } 121}); 122 123$(".carouselAcademiclogs").owlCarousel({ 124 margin: 20, 125 loop: true, 126 autoplay: true, 127 autoplayTimeout: 3000, 128 autoplayHoverPause: true, 129 responsive: { 130 0: { 131 items: 1, 132 nav: false 133 }, 134 600: { 135 items: 2, 136 nav: false 137 }, 138 1000: { 139 items: 3, 140 nav: false 141 } 142 } 143}); 144 145$(".carouselPublisherlogs").owlCarousel({ 146 margin: 20, 147 loop: true, 148 autoplay: true, 149 autoplayTimeout: 3000, 150 autoplayHoverPause: true, 151 responsive: { 152 0: { 153 items: 1, 154 nav: false 155 }, 156 600: { 157 items: 2, 158 nav: false 159 }, 160 1000: { 161 items: 5, 162 nav: false 163 } 164 } 165}); 166 167 168//Leadcapture Form
169function openLeadCaptureForm() { 170 document.getElementById("leadCaptureForm").style.cssText = "right: 0px;"; 171} 172function closeLeadCaptureForm() { 173 document.getElementById("leadCaptureForm").style.cssText = "right: -400px;"; 174} 175 176function toggleVisibility() { 177 var element = document.getElementById("elementToToggle"); 178 element.classList.toggle("hidden"); 179 //document.body.addEventListener('onclick', toggleVisibility) 180} 181 182 183 184 185(function () { 186 "use strict"; 187 188 /** 189 * Easy selector helper function 190 */ 191 const select = (el, all = false) => { 192 el = el.trim() 193 if (all) { 194 return [...document.querySelectorAll(el)] 195 } else { 196 return document.querySelector(el) 197 } 198 } 199 200 /** 201 * Easy event listener function 202 */ 203 const on = (type, el, listener, all = false) => { 204 if (all) { 205 select(el, all).forEach(e => e.addEventListener(type, listener)) 206 } else { 207 select(el, all).addEventListener(type, listener) 208 } 209 } 210 211 /** 212 * Easy on scroll event listener 213 */ 214 const onscroll = (el, listener) => { 215 el.addEventListener('scroll', listener) 216 } 217 218 /** 219 * Navbar links active state on scroll 220 */ 221 let navbarlinks = select('#navbar .scrollto', true) 222 const navbarlinksActive = () => { 223 let position = window.scrollY + 200 224 navbarlinks.forEach(navbarlink => { 225 if (!navbarlink.hash) return 226 let section = select(navbarlink.hash) 227 if (!section) return 228 if (position >= section.offsetTop && position <= (section.offsetTop + section.offsetHeight)) { 229 navbarlink.classList.add('active') 230 } else { 231 navbarlink.classList.remove('active') 232 } 233 }) 234 } 235 window.addEventListener('load', navbarlinksActive) 236 onscroll(document, navbarlinksActive) 237 238 /** 239 * Scrolls to an element with header offset 240 */ 241 const scrollto = (el) => { 242 let header = select('#header') 243 let offset = header.offsetHeight 244 245 if (!header.classList.contains('header-scrolled')) { 246 offset -= 10 247 } 248 249 let elementPos = select(el).offsetTop 250 window.scrollTo({ 251 top: elementPos - offset, 252 behavior: 'smooth' 253 }) 254 } 255 256 /** 257 * Toggle .header-scrolled class to #header when page is scrolled 258 */ 259 let selectHeader = select('#header') 260 if (selectHeader) { 261 const headerScrolled = () => { 262 if (window.scrollY > 100) { 263 selectHeader.classList.add('header-scrolled') 264 } else { 265 selectHeader.classList.remove('header-scrolled') 266 } 267 } 268 window.addEventListener('load', headerScrolled) 269 onscroll(document, headerScrolled) 270 } 271 272 /** 273 * Mobile nav toggle 274 */ 275 on('click', '.mobile-nav-toggle', function (e) { 276 select('#navbar').classList.toggle('navbar-mobile') 277 this.classList.toggle('bi-list') 278 this.classList.toggle('bi-x') 279 }) 280 281 /** 282 * Mobile nav dropdowns activate 283 */ 284 on('click', '.navbar .dropdown > a', function (e) { 285 if (select('#navbar').classList.contains('navbar-mobile')) { 286 e.preventDefault() 287 this.nextElementSibling.classList.toggle('dropdown-active') 288 } 289 }, true) 290 291 /** 292 * Scrool with ofset on links with a class name .scrollto 293 */ 294 on('click', '.scrollto', function (e) { 295 if (select(this.hash)) { 296 e.preventDefault() 297 298 let navbar = select('#navbar') 299 if (navbar.classList.contains('navbar-mobile')) { 300 navbar.classList.remove('navbar-mobile') 301 let navbarToggle = select('.mobile-nav-toggle') 302 navbarToggle.classList.toggle('bi-list') 303 navbarToggle.classList.toggle('bi-x') 304 } 305 scrollto(this.hash) 306 } 307 }, true) 308 309 /** 310 * Scroll with ofset on page load with hash links in the url 311 */ 312 window.addEventListener('load', () => { 313 if (window.location.hash) { 314 if (select(window.location.hash)) { 315 scrollto(window.location.hash) 316 } 317 } 318 });
319 320 321 /** 322 * Animation on scroll 323 */ 324 function aos_init() { 325 AOS.init({ 326 duration: 1000, 327 easing: "ease-in-out", 328 once: true, 329 mirror: false 330 }); 331 } 332 window.addEventListener('load', () => { 333 aos_init(); 334 }); 335 336 337 /** 338 * Initiate Pure Counter 339 */ 340 new PureCounter(); 341 342 343})(); 344 345 346 347document.querySelectorAll('.readmore').forEach(function (item) { 348 item.addEventListener("click", function () { 349 var p = this.parentElement; 350 var x = p.previousElementSibling; 351 if (x.style.display === "none") { 352 x.style.display = "inline"; 353 this.innerHTML = "Read Less" 354 } else { 355 x.style.display = "none"; 356 this.innerHTML = "Read More" 357 } 358 }) 359}) 360 361 362 363 364 365 366 367 368 369$(".carouselPlacemnetsList").owlCarousel({ 370 margin: 20, 371 loop: true, 372 autoplay: true, 373 autoplayTimeout: 3000, 374 autoplayHoverPause: true, 375 responsive: { 376 0: { 377 items: 1, 378 nav: false 379 }, 380 600: { 381 items: 1, 382 nav: false 383 }, 384 1000: { 385 items: 1, 386 nav: false 387 } 388 } 389}); 390 391$(".carouselAcademiclogs1").owlCarousel({ 392 margin: 20, 393 loop: true, 394 autoplay: true, 395 autoplayTimeout: 3000, 396 autoplayHoverPause: true, 397 responsive: { 398 0: { 399 items: 1, 400 nav: false 401 }, 402 600: { 403 items: 2, 404 nav: false 405 }, 406 1000: { 407 items: 3, 408 nav: false 409 } 410 } 411}); 412 413 414$('.carouselLeaderShip').owlCarousel({ 415 loop: true, 416 margin: 10, 417 nav: true, 418 autoplay: true, 419 responsive: { 420 0: { 421 items: 1 422 }, 423 600: { 424 items: 1 425 }, 426 1000: { 427 items: 2 428 } 429 } 430}) 431 432 433 434 435$('.owl-starPlacements').owlCarousel({ 436 loop: true, 437 margin: 10, 438 nav: true, 439 autoplay: true, 440 responsive: { 441 0: { 442 items: 1 443 }, 444 600: { 445 items: 3 446 }, 447 1000: { 448 items: 4 449 } 450 } 451}) 452 453 454$(".carouselAumni").owlCarousel({ 455 margin: 20, 456 loop: true, 457 autoplay: true, 458 autoplayTimeout: 2000, 459 autoplayHoverPause: true, 460 responsive: { 461 0: { 462 items: 1, 463 nav: false 464 }, 465 600: { 466 items: 1, 467 nav: false 468 }, 469 1000: { 470 items: 2, 471 nav: false 472 } 473 } 474}); 475 476$('.alumni-carousel').owlCarousel({ 477 loop: true, 478 items: 1, 479 margin: 0, 480 stagePadding: 0, 481 smartSpeed: 450, 482 nav: true, 483}); 484 485// Function to toggle between light and dark themes 486//function toggleTheme() { 487 // Get the current theme class of the body 488 // const htmlClass = document.html.classList.contains('light') ? 'light' : 'dark'; 489 490 // Toggle the class based on the current theme 491 // if (bodyClass === 'light') { 492 // document.html.classList.remove('light'); 493 // document.html.classList.add('dark'); 494 495 496 // } else { 497 // document.html.classList.remove('dark'); 498 // document.html.classList.add('light'); 499 500 // } 501 502 // Save user preference (optional) 503 // saveThemePreference(htmlClass === 'light' ? 'dark' : 'light'); 504//} 505 506// Function to save user theme preference (optional) 507function saveThemePreference(theme) { 508 localStorage.setItem('preferredTheme', theme); 509} 510 511// Function to load user theme preference (optional) 512function loadThemePreference() { 513 const preferredTheme = localStorage.getItem('preferredTheme'); 514 if (preferredTheme === 'dark') { 515 document.body.classList.remove('light'); 516 document.body.classList.add('dark'); 517 } 518} 519 520// Load the user's preferred theme on page load (optional) 521document.addEventListener('DOMContentLoaded', function () { 522 loadThemePreference(); 523}); 524 525 526 527 528 529 530 531// Define the minimum and maximum font sizes 532const MIN_FONT_SIZE = 12; // minimum font size in pixels 533const MAX_FONT_SIZE = 18; // maximum font size in pixels 534 535// Function to increase font size by 2px, with a maximum limit 536function increaseFontSize() { 537 const body = document.body; 538 const computedStyle = window.getComputedStyle(body);
539 let currentSize = parseFloat(computedStyle.getPropertyValue('font-size')); 540 541 // Check if currentSize is less than MAX_FONT_SIZE 542 if (currentSize < MAX_FONT_SIZE) { 543 body.style.fontSize = Math.min(currentSize + 2, MAX_FONT_SIZE) + 'px'; 544 } 545} 546 547// Function to decrease font size by 2px, with a minimum limit 548function decreaseFontSize() { 549 const body = document.body; 550 const computedStyle = window.getComputedStyle(body); 551 let currentSize = parseFloat(computedStyle.getPropertyValue('font-size')); 552 553 // Check if currentSize is greater than MIN_FONT_SIZE 554 if (currentSize > MIN_FONT_SIZE) { 555 body.style.fontSize = Math.max(currentSize - 2, MIN_FONT_SIZE) + 'px'; 556 } 557} 558 559// Function to reset font size to default (16px) 560function resetFontSize() { 561 document.body.style.fontSize = '16px'; 562} 563 564 565const navLinks = document.querySelectorAll('.scrollspyTarget') 566navLinks.forEach(navLink => { 567 navLink.addEventListener('click', () => { 568 navLinks.forEach(navLink => { 569 navLink.classList.remove('active'); 570 }); 571 navLink.classList.add('active');
572 Hash = navLink.attributes.href.value; 573 tabId = Hash.slice(1); 574 console.log(tabId); 575 smoothScroll(tabId, 50) 576 }); 577}); 578 579function smoothScroll(target, duration) { 580 var target = document.getElementById(target) 581 var targetPosition = target.getBoundingClientRect().top; 582 var tp = targetPosition - 235; 583 console.log('targetPosition = ' + tp); 584 var startPostion = window.pageYOffset; 585 var distance = tp; 586 var startTime = null; 587 588 function animation(currentTime) { 589 console.log('startTime' + startTime); 590 if (startTime === null) startTime = currentTime; 591 var timeElapsed = currentTime - startTime; 592 var run = ease(timeElapsed, startPostion, distance, duration); 593 window.scrollTo(0, run); 594 if (timeElapsed < duration) requestAnimationFrame(animation) 595 } 596 function ease(t, b, c, d) { 597 t /= d / 2; 598 if (t < 1) return c / 2 * t * t + b; 599 t--; 600 return -c / 2 * (t * (t - 2) - 1) + b 601 } 602 requestAnimationFrame(animation); 603 604} 605 606// ChatBot 607 608$(document).ready(function () { 609 $(".chatbot").click(function () { 610 $(".chatbot").toggleClass("close"); 611 $(".chatbot-icons").slideToggle("slow"); 612 }); 613}); 614$(document).ready(function () { 615 $("body").tooltip({ selector: '[data-toggle=tooltip]' }); 616}); 617 618 619 620$(".carouselPlacementsLaw").owlCarousel({ 621 margin: 20, 622 loop: true, 623 autoplay: true, 624 autoplayTimeout: 3000, 625 autoplayHoverPause: true, 626 responsive: { 627 0: { 628 items: 2, 629 nav: false 630 }, 631 600: { 632 items: 3, 633 nav: false 634 }, 635 1000: { 636 items: 4, 637 nav: false 638 } 639 } 640});
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.