1/** @format */ 2 3// Sticky Header 4$(window).on("scroll", function (e) { 5 if ($(window).width() > 768) { 6 if ($(window).scrollTop() > 200) { 7 $("header").addClass("fixed-top"); 8 $(".navbar-collapse").removeClass("show"); 9 $(".navbar-toggler").attr("aria-expanded", "false"); 10 } else { 11 $("header").removeClass("fixed-top"); 12 } 13 } 14 e.preventDefault(); 15}); 16 17// Dropdown Mega Menu 18// $(document).ready(function(){ 19// (function($) { 20// $.fn.menumaker = function(options) { 21// var cssmenu = $(this), 22// settings = $.extend({ 23// format: "dropdown", 24// sticky: false 25// }, options); 26// return this.each(function() { 27// $(this).find(".navbar-toggler").on('click', function() { 28// // $(this).toggleClass('menu-opened'); 29// var mainmenu = $(this).next('ul.megamenu-content'); 30// if (mainmenu.hasClass('open')) { 31// mainmenu.slideToggle().removeClass('open'); 32// } else { 33// mainmenu.slideToggle().addClass('open'); 34// if (settings.format === "dropdown") { 35// mainmenu.find('ul').show(); 36// } 37// } 38// }); 39// cssmenu.find('li ul.megamenu-content').parent().addClass('mega-dropdown'); 40 41// function multiTg() { 42// //cssmenu.find(".mega-dropdown").prepend('<span class="submenu-button"><img src="images/arrow-down-menu.svg" class="img-fluid" alt="arrow down"></span>'); 43// cssmenu.find('.submenu-button').on('click', function() { 44// $(this).toggleClass('submenu-opened'); 45// if ($(this).siblings('ul.megamenu-content').hasClass('open')) { 46// $(this).siblings('ul.megamenu-content').removeClass('open').slideToggle(); 47// } else { 48// $(this).siblings('ul.megamenu-content').addClass('open').slideToggle(); 49// } 50// }); 51// cssmenu.find('a').on('click', function() { 52// if ($(this).attr('href') == '#') { 53// $(this).siblings('span').toggleClass('submenu-opened'); 54// if ($(this).siblings('ul.megamenu-content').hasClass('open')) { 55// $(this).siblings('ul.megamenu-content').removeClass('open').slideToggle(); 56// } else { 57// $(this).siblings('ul.megamenu-content').addClass('open').slideToggle(); 58// } 59// } 60// }); 61// }; 62// if (settings.format === 'multitoggle') multiTg(); 63// else cssmenu.addClass('mega-dropdown'); 64// if (settings.sticky === true) cssmenu.css('position', 'fixed'); 65 66// function resizeFix() { 67// var mediasize = 991.5; 68// if ($(window).width() > mediasize) { 69// cssmenu.find('ul.megamenu-content').css('display', ''); 70// } 71// if ($(window).width() <= mediasize) { 72// cssmenu.find('ul.megamenu-content').hide().removeClass('open'); 73// } 74// }; 75// resizeFix(); 76// return $(window).on('resize', resizeFix); 77// }); 78// }; 79// var flag = true; 80// $(window).on('resize', function() { 81// var mediasize = 991.5; 82// if (flag) { 83// if ($(window).width() <= mediasize) { 84// $("#menu-header-menu").menumaker({ 85// format: "multitoggle" 86// }); 87// flag = false; 88// } 89// } 90// }); 91// $(document).ready(function() { 92// var mediasize = 991.5; 93// if (flag) { 94// if ($(window).width() <= mediasize) { 95// $("#menu-header-menu").menumaker({ 96// format: "multitoggle" 97// }); 98// flag = false;
99// } 100// } 101// }); 102// })($); 103// }); 104$(document).ready(function () { 105 function menumaker(menu, options) { 106 const $cssmenu = $(menu); 107 const settings = $.extend({ format: "dropdown", sticky: false }, options); 108 109 if (!$cssmenu.length) return; 110 111 const $toggler = $(".navbar-toggler"); 112 113 $toggler.on("click", function () { 114 const $mainmenu = $(".navbar-collapse"); 115 if ($mainmenu.length) { 116 const isOpen = $mainmenu.hasClass("show"); 117 $("body").toggleClass("menu-open", !isOpen); 118 } 119 }); 120 121 $("li ul.megamenu-content").each(function () { 122 $(this).parent().addClass("mega-dropdown"); 123 }); 124 125 function multiTg() { 126 $(".mega-dropdown").each(function () { 127 if (!$(this).find(".submenu-button").length) { 128 $(this).prepend( 129 `<span class="submenu-button"> 130 <svg width="13" height="8" viewBox="0 0 13 8" fill="none" xmlns="http://www.w3.org/2000/svg"> 131 <path d="M1.5 1.01172L6.5 6.01172L11.5 1.01172" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/> 132 </svg> 133 </span>` 134 ); 135 } 136 }); 137 138 $(".submenu-button").on("click", function (e) { 139 e.stopPropagation(); 140 const $dropdown = $(this).parent(); 141 const $submenu = $dropdown.find("ul.megamenu-content").first(); 142 143 // Close all others 144 $(".mega-dropdown") 145 .not($dropdown) 146 .removeClass("active") 147 .find("ul.megamenu-content") 148 .removeClass("open") 149 .hide(); 150 151 const isOpen = $submenu.hasClass("open"); 152 if (isOpen) { 153 $submenu.removeClass("open").hide(); 154 $dropdown.removeClass("active"); 155 } else { 156 $submenu.addClass("open").css("display", "block"); 157 $dropdown.addClass("active"); 158 } 159 }); 160 } 161 162 multiTg(); 163 164 if (settings.sticky) { 165 $cssmenu.css("position", "fixed"); 166 } 167 168 function resizeFix() { 169 const mediasize = 1199; 170 171 $("ul.megamenu-content").each(function () { 172 if ($(window).width() > mediasize) { 173 $(this).removeClass("open").css("display", ""); 174 } else { 175 if (!$(this).hasClass("open")) { 176 $(this).css("display", "none"); 177 } 178 } 179 }); 180 181 if ($(window).width() > mediasize) { 182 $("body").removeClass("menu-open"); 183 } 184 } 185 186 $(window).on("resize", resizeFix); 187 resizeFix(); 188 } 189 190 let flag = true; 191 function initializeMenu() { 192 if (flag) { 193 menumaker("#menu-header-menu", { format: "multitoggle" }); 194 flag = false; 195 } 196 } 197 198 $(window).on("resize", initializeMenu); 199 initializeMenu(); 200}); 201 202// Timeline slider 203$(document).ready(function () { 204 var galleryTop = new Swiper(".timeline-content", { 205 init: true, 206 spaceBetween: 10, 207 freeMode: true, 208 // loop: true, 209 speed: 1000, 210 autoHeight: true, 211 loopedSlides: 1, 212 }); 213 var galleryThumbs = new Swiper(".timeline-year", { 214 navigation: { 215 nextEl: ".swiper-button-next", 216 prevEl: ".swiper-button-prev", 217 }, 218 init: true, 219 spaceBetween: 10, 220 freeMode: true, 221 centeredSlides: true, 222 slidesPerView: 6, 223 touchRatio: 0.1, 224 speed: 1000, 225 slideToClickedSlide: true, 226 // loop: true, 227 loopedSlides: 1, 228 breakpoints: { 229 320: { 230 slidesPerView: 1, 231 }, 232 576: { 233 slidesPerView: 1, 234 }, 235 640: { 236 slidesPerView: 2, 237 }, 238 768: { 239 slidesPerView: 3, 240 }, 241 1024: { 242 slidesPerView: 5, 243 }, 244 1200: { 245 slidesPerView: 6, 246 }, 247 }, 248 }); 249 galleryTop.controller.control = galleryThumbs; 250 galleryThumbs.controller.control = galleryTop; 251}); 252 253// Sticky Header 254$(function () { 255 $(".tip-top").tooltip({ 256 placement: "top", 257 }); 258}); 259 260/*-- our history --*/ 261$("ul.history-year-list li a").click(function (e) { 262 e.preventDefault(); 263 $("ul.history-year-list li a").removeClass("active"); 264 $(this).addClass("active"); 265 var target = $($(this).attr("href")); 266 if (target.length) { 267 var scrollTo = target.offset().top - 100; 268 $("body, html").animate({ scrollTop: scrollTo + "px" }, 800); 269 } 270}); 271/*-- our history --*/ 272 273$(document).ready(function () { 274 $(".luf-tabs a[href='#news']").click(function () { 275 $(".tournament-detail").addClass("d-block"); 276 $(".tournament-detail").removeClass("d-none"); 277 }); 278 279 $( 280 ".luf-tabs a[href='#about'], .luf-tabs a[href='#support'], .luf-tabs a[href='#reports']" 281 ).click(function () { 282 $(".tournament-detail").addClass("d-none"); 283 $(".tournament-detail").removeClass("d-block"); 284 }); 285}); 286 287// loader start 288 289$(document).ready(function () { 290 $(window).bind("load", function () { 291 $(".overlays, body").addClass("loaded"); 292 setTimeout(function () { 293 $(".overlays").css({ opacity: "0", visibility: "hidden" }); 294 }, 2000); 295 }); 296 297 // Will remove overlay after 1min for users cannnot load properly. 298 setTimeout(function () { 299 $(".overlays, body").addClass("loaded"); 300 }, 2000); 301}); 302 303// loader end 304 305// Radio button click div hide/show 306$(document).ready(function (e) { 307 $("input:radio[name='seatingOption']").click(function (e) { 308 $(".seating-group .hidden").hide().removeClass("shown"); 309 $("#" + $(this).val()).show(); 310 setTimeout(function () { 311 $(".hidden").addClass("shown"); 312 }, 0); 313 314 if ($(this).attr("id").trim() == "groupPackages") { 315 $("form.buy-tickets-form .add-cart-total").css("display", "none"); 316 } else { 317 $("form.buy-tickets-form .add-cart-total").css("display", "block"); 318 } 319 }); 320 $("input:radio[name='premiumseatingOption']").click(function (e) { 321 $( 322 "._premiumseating .hidden, ._southWestgrandstand .hidden, ._eastclubinternational .hidden, ._southWestclubinternational .hidden, ._maritimetravelpatiosuite .hidden, ._memorylane .hidden" 323 ) 324 .hide() 325 .removeClass("shown"); 326 $("#" + $(this).val()).show(); 327 setTimeout(function () { 328 $(".hidden").addClass("shown"); 329 }, 0); 330 }); 331 $(
332 "input:radio[name='westgrandstand'], input:radio[name='southWestgrandstand']" 333 ).click(function (e) { 334 $("._westgrandstand .hidden, ._southWestgrandstand .hidden") 335 .hide() 336 .removeClass("shown"); 337 $("#" + $(this).val()).show(); 338 setTimeout(function () { 339 $(".hidden").addClass("shown"); 340 }, 0); 341 }); 342}); 343 344// Checkbox check to button enable 345$(document).ready(function (e) { 346 $(".checkbox__input").click(function () { 347 $("button[name='addtocart']").attr("disabled", !this.checked); 348 }); 349}); 350 351//select-box style 352$(document).ready(function (e) { 353 var $select = $("#selectTable, #selectTable2, #selectTable3, #selectTable4"), 354 $speed = "fast"; 355 $select.each(function (e) { 356 // Allow default browser styling 357 if ($(this).hasClass("default")) { 358 return; 359 } 360 $(this).css("display", "none"); 361 // Generate fancy select box 362 $(this).after('<ul class="select-options" style="display: none;"></ul>'); 363 var $current = $(this), 364 $fancy = $current.next(".select-options"); 365 366 // Get options 367 var $options = $(this).find("option"); 368 $options.each(function (index) { 369 var $val = $(this).val(), 370 $text = $(this).text(), 371 $disabled = ""; 372 // Add class for disabled options 373 if ($(this).attr("disabled")) $disabled = " disabled"; 374 375 if (index == 0) { 376 // Create clickable object from first option 377 $fancy.before( 378 '<span class="selected custom-select form-control" data-val="' + 379 $val + 380 '">' + 381 $text + 382 "</span>" 383 ); 384 } 385 // Load all options into fake dropdown 386 $fancy.append( 387 '<li class="select-option' + 388 $disabled + 389 '" data-val="' + 390 $val + 391 '">' + 392 $text + 393 "</li>" 394 ); 395 // Update fake select box if this option is selected 396 if ($(this).attr("selected")) { 397 $(this).parent("select").val($val); 398 $(this) 399 .parent("select") 400 .next(".selected") 401 .attr("data-val", $val) 402 .text($text); 403 } 404 }); 405 }); 406 // Show/hide options on click 407 $(".selected").click(function (target) { 408 var $box = $(this).next(".select-options"), 409 $target = target, 410 $object = $(this); 411 // Prevent multiple open select boxes 412 if ($box.is(":visible")) { 413 $box.slideUp($speed); 414 return; 415 } else { 416 $(".fancy-select").slideUp(); 417 $box.slideDown($speed); 418 } 419 // Click outside select box closes it 420 $target.stopPropagation(); 421 if ($box.css("display") !== "none") { 422 $(document).click(function () { 423 $box.slideUp($speed); 424 }); 425 } 426 }); 427 // Make selection 428 $(".select-option").click(function (e) { 429 e.preventDefault(); 430 var $val = $(this).attr("data-val"), 431 $text = $(this).text(), 432 $box = $(this).parent(".select-options"),
433 $selected = $box.prev(".selected"), 434 $disabled = $(this).hasClass("disabled"); 435 436 // Basic disabled option functionality 437 if ($disabled) { 438 return; 439 } 440 441 $box.slideUp($speed); 442 443 // Update select object's value 444 // and the fake box's "value" 445 $selected.prev("select").val($val); 446 $selected.attr("data-val", $val).text($text); 447 }); 448}); 449 450// Success msg hide/show 451$(document).ready(function () { 452 $("button[name='addtocart']").click(function () { 453 $(".buy-tickets-form").hide(); 454 $(".success-ticket-msg").show(); 455 }); 456 457 $(".addmoreticket").click(function () { 458 $(".success-ticket-msg").hide(); 459 $(".buy-tickets-form").show(); 460 }); 461}); 462 463// Search Bar 464$(document).ready(function () { 465 $(".search-bar").hide(); 466 $(".close").click(function () { 467 $(".search-bar").hide(); 468 }); 469 $(".search-btn").click(function () { 470 $(".search-bar").show(); 471 }); 472}); 473 474// Search Bar submit button 475$(document).ready(function () { 476 $(':input[type="submit"]').prop("disabled", true); 477 $('input[type="text"]').keyup(function () { 478 if ($(this).val() != "") { 479 $(':input[type="submit"]').prop("disabled", false); 480 } 481 }); 482}); 483 484// Tabs selector mobile view 485$(document).ready(function () { 486 $("#tab_selector").on("change", function (e) { 487 $(".form-tabs li a").eq($(this).val()).tab("show"); 488 }); 489}); 490 491// Banner Owl slider 492// $(document).ready(function () { 493// var sync1 = $("#sync1"); 494// var sync2 = $("#sync2"); 495// var slidesPerPage = 4; //globaly define number of elements per page 496// var syncedSecondary = true; 497 498// sync1 499// .owlCarousel({ 500// items: 1, 501// slideSpeed: 2000, 502// nav: true, 503// autoplay: true, 504// dots: false, 505// loop: true, 506// autoplayTimeout: 15000, 507// responsiveRefreshRate: 200, 508// navText: [ 509// '<svg width="14px" height="24px" viewBox="0 0 11 20"><path style="fill:none;stroke-width: 3px;stroke: #fff;" d="M9.554,1.001l-8.607,8.607l8.607,8.606"/></svg>', 510// '<svg width="14px" height="24px" viewBox="0 0 11 20" version="1.1"><path style="fill:none;stroke-width: 3px;stroke: #fff;" d="M1.054,18.214l8.606,-8.606l-8.606,-8.607"/></svg>', 511// ], 512// responsive: { 513// 0: { 514// items: 1, 515// nav: false, 516// }, 517// 600: { 518// items: 1, 519// nav: false, 520// }, 521// 1000: { 522// items: 1, 523// }, 524// }, 525// }) 526// .on("changed.owl.carousel", syncPosition); 527 528// sync1.on("changed.owl.carousel", function (event) { 529// $(".owl-carousel video").each(function () { 530// $(this)[0].load(); 531// }); 532// }); 533 534// sync2 535// .on("initialized.owl.carousel", function () { 536// sync2.find(".owl-item").eq(0).addClass("current"); 537// }) 538// .owlCarousel({ 539// items: slidesPerPage, 540// loop: false, 541// dots: false, 542// nav: false, 543// margin: 10, 544// smartSpeed: 200, 545// slideSpeed: 500, 546// slideBy: slidesPerPage, 547// responsiveRefreshRate: 100, 548// responsive: { 549// 0: { 550// stagePadding: 50, 551// items: 1, 552// }, 553// 600: { 554// stagePadding: 50, 555// items: 2, 556// }, 557// 1000: { 558// items: slidesPerPage, 559// }, 560// }, 561// }) 562// .on("changed.owl.carousel", syncPosition2); 563 564// function syncPosition(el) { 565// var count = el.item.count - 1; 566// var current = Math.round(el.item.index - el.item.count / 2 - 0.5); 567 568// if (current < 0) { 569// current = count; 570// } 571// if (current > count) { 572// current = 0; 573// } 574 575// //end block 576 577// sync2 578// .find(".owl-item") 579// .removeClass("current") 580// .eq(current) 581// .addClass("current"); 582// var onscreen = sync2.find(".owl-item.active").length - 1; 583// var start = sync2.find(".owl-item.active").first().index(); 584// var end = sync2.find(".owl-item.active").last().index(); 585 586// if (current > end) { 587// sync2.data("owl.carousel").to(current, 100, true); 588// } 589// if (current < start) { 590// sync2.data("owl.carousel").to(current - onscreen, 100, true); 591// } 592// } 593 594// function syncPosition2(el) { 595// if (syncedSecondary) { 596// var number = el.item.index; 597// sync1.data("owl.carousel").to(number, 100, true); 598// } 599// } 600 601// sync2.on("click", ".owl-item", function (e) { 602// e.preventDefault(); 603// var number = $(this).index(); 604// sync1.data("owl.carousel").to(number, 300, true); 605// }); 606 607// $("#sync2 li a").on("click", function (event) { 608// var $this = $(this); 609// if ($(this).attr("href")) { 610// window.location.href = $(this).attr("href"); 611// } 612// }); 613 614// $("#sync2 h5 a").on("click", function (event) { 615// var $this = $(this); 616// if ($(this).attr("href")) { 617// window.location.href = $(this).attr("href"); 618// } 619// }); 620// }); 621 622// Accrodion -start 623$(document).ready(function () { 624 $(".tournament-list, .event-list").on( 625 "hide.bs.collapse show.bs.collapse", 626 (e) => { 627 $(e.target).prev().find("i").toggleClass("fa-angle-down fa-angle-right"); 628 } 629 ); 630 $(".shopping-list, .facility-list, event-list").on( 631 "hide.bs.collapse show.bs.collapse", 632 (e) => { 633 $(e.target).prev().find("i").toggleClass("fa-angle-right fa-angle-down"); 634 } 635 ); 636}); 637// Accrodion -end 638 639// Filter Category - start 640$(document).ready(function () { 641 var filterActive; 642 function filterCategory(category) { 643 if (filterActive != category) { 644 $(".filter-cat-results .f-cat").removeClass("active"); 645 $(".filter-cat-results .f-cat") 646 .filter('[data-cat="' + category + '"]') 647 .addClass("active"); 648 filterActive = category; 649 } 650 } 651 $(".f-cat").addClass("active"); 652 $(".filtering select").change(function (e) { 653 if ($(this).val() == "cat-all") { 654 $(".filter-cat-results .f-cat").addClass("active"); 655 filterActive = "cat-all"; 656 } else { 657 filterCategory($(this).val()); 658 } 659 }); 660}); 661// Filter Category - end 662 663// Client logo owl slider 664// $(document).ready(function () { 665// $("#client-logo").owlCarousel({ 666// center: false, 667// autoplay: true, 668// loop: true, 669// nav: true, 670// dots: true, 671// navText: [ 672// '<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.41016 1.41L2.83016 6L7.41016 10.59L6.00016 12L0.000155878 6L6.00016 1.23266e-07L7.41016 1.41Z" fill="black"/></svg>', 673// '<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.589844 10.59L5.16984 6L0.589844 1.41L1.99984 0L7.99984 6L1.99984 12L0.589844 10.59Z" fill="black"/></svg>', 674// ], 675// responsiveClass: true, 676// responsive: { 677// 0: { 678// margin: 0, 679// items: 1, 680// }, 681// 768: { 682// margin: 20, 683// items: 3, 684// }, 685// 992: { 686// margin: 20, 687// items: 4, 688// }, 689// 1200: { 690// margin: 50,
691// items: 5, 692// }, 693// }, 694// }); 695 696// $("#fac-slider").owlCarousel({ 697// /*center: false,*/ 698// autoplay: true, 699// loop: false, 700// nav: false, 701// dots: false, 702// navText: [ 703// '<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.41016 1.41L2.83016 6L7.41016 10.59L6.00016 12L0.000155878 6L6.00016 1.23266e-07L7.41016 1.41Z" fill="black"/></svg>', 704// '<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.589844 10.59L5.16984 6L0.589844 1.41L1.99984 0L7.99984 6L1.99984 12L0.589844 10.59Z" fill="black"/></svg>', 705// ], 706// responsiveClass: true, 707// responsive: { 708// 0: { 709// margin: 20, 710// items: 1, 711// }, 712// 768: { 713// margin: 20, 714// items: 2, 715// }, 716// 992: { 717// margin: 20, 718// items: 3, 719// }, 720// 1200: { 721// margin: 20, 722// items: 3, 723// }, 724// }, 725// }); 726 727// $(".room-slider").owlCarousel({ 728// autoplay: true, 729// loop: false, 730// nav: true, 731// dots: true, 732// navText: [ 733// '<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.41016 1.41L2.83016 6L7.41016 10.59L6.00016 12L0.000155878 6L6.00016 1.23266e-07L7.41016 1.41Z" fill="black"/></svg>', 734// '<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0.589844 10.59L5.16984 6L0.589844 1.41L1.99984 0L7.99984 6L1.99984 12L0.589844 10.59Z" fill="black"/></svg>', 735// ], 736// responsiveClass: true, 737// responsive: { 738// 0: { 739// margin: 20, 740// items: 1, 741// }, 742// 768: { 743// margin: 20, 744// items: 2, 745// }, 746// 992: { 747// margin: 20, 748// items: 3, 749// }, 750// 1200: { 751// margin: 0, 752// items: 3, 753// }, 754// }, 755// }); 756// }); 757 758// More text ellipse - start 759$(document).ready(function () { 760 var showChar = 162; 761 var ellipsestext = "..."; 762 var moretext = "more"; 763 var lesstext = "less"; 764 765 if ($(window).width() < 767) { 766 $(".btn-more").each(function () { 767 var content = $(this).html(); 768 769 if (content.length > showChar) { 770 var c = content.substr(0, showChar); 771 var h = content.substr(showChar, content.length - showChar); 772 773 var html = 774 c + 775 '<span class="moreellipses">' + 776 ellipsestext + 777 ' </span><span class="morecontent"><span>' + 778 h + 779 '</span> <a href="" class="morelink">' + 780 moretext + 781 "</a></span>"; 782 783 $(this).html(html); 784 } 785 }); 786 787 $(".morelink").click(function () { 788 if ($(this).hasClass("less")) { 789 $(this).removeClass("less"); 790 $(this).html(moretext); 791 } else { 792 $(this).addClass("less"); 793 $(this).html(lesstext); 794 } 795 $(this).parent().prev().toggle(); 796 $(this).prev().toggle(); 797 return false; 798 }); 799 } 800}); 801// More text ellipse - end 802 803// Table responsive - start 804$(document).ready(function () { 805 $(".table-responsive-stack") 806 .find("th") 807 .each(function (i) { 808 $(".table-responsive-stack td:nth-child(" + (i + 1) + ")").prepend( 809 '<span class="table-responsive-stack-thead">' + 810 $(this).text() + 811 "</span> " 812 ); 813 $(".table-responsive-stack-thead").hide(); 814 }); 815 $(".current-leaderboard, .remaining-riders, .content-table").each( 816 function () { 817 var thCount = $(this).find("th").length; 818 var rowGrow = 100 / thCount + "%"; 819 $(this).find("th, td").css("flex-basis", rowGrow); 820 } 821 ); 822 function flexTable() { 823 if ($(window).width() < 991) { 824 $(".table-responsive-stack").each(function (i) { 825 $(this).find(".table-responsive-stack-thead").show(); 826 $(this).find("thead").hide(); 827 }); 828 } else { 829 $(".table-responsive-stack").each(function (i) { 830 $(this).find(".table-responsive-stack-thead").hide(); 831 $(this).find("thead").show(); 832 }); 833 } 834 } 835 836 flexTable(); 837 window.onresize = function (event) { 838 flexTable(); 839 }; 840}); 841$(document).ready(function () { 842 $("#table1") 843 .find("th") 844 .each(function (i) { 845 $("#table1 td:nth-child(" + (i + 1) + ")").prepend( 846 '<span class="table-responsive-stack-thead">' + 847 $(this).text() + 848 "</span> " 849 ); 850 $(".table-responsive-stack-thead").hide(); 851 }); 852 $("#table2") 853 .find("th") 854 .each(function (i) { 855 $("#table2 td:nth-child(" + (i + 1) + ")").prepend( 856 '<span class="table-responsive-stack-thead">' + 857 $(this).text() + 858 "</span> " 859 ); 860 $(".table-responsive-stack-thead").hide(); 861 }); 862 $("#table3") 863 .find("th") 864 .each(function (i) { 865 $("#table3 td:nth-child(" + (i + 1) + ")").prepend( 866 '<span class="table-responsive-stack-thead">' + 867 $(this).text() + 868 "</span> " 869 ); 870 $(".table-responsive-stack-thead").hide(); 871 }); 872 $("#table4") 873 .find("th") 874 .each(function (i) { 875 $("#table4 td:nth-child(" + (i + 1) + ")").prepend( 876 '<span class="table-responsive-stack-thead">' + 877 $(this).text() + 878 "</span> " 879 ); 880 $(".table-responsive-stack-thead").hide(); 881 }); 882 $("#table5") 883 .find("th") 884 .each(function (i) { 885 $("#table5 td:nth-child(" + (i + 1) + ")").prepend( 886 '<span class="table-responsive-stack-thead">' + 887 $(this).text() + 888 "</span> " 889 ); 890 $(".table-responsive-stack-thead").hide(); 891 }); 892 $("#table6") 893 .find("th") 894 .each(function (i) { 895 $("#table6 td:nth-child(" + (i + 1) + ")").prepend( 896 '<span class="table-responsive-stack-thead">' + 897 $(this).text() + 898 "</span> " 899 ); 900 $(".table-responsive-stack-thead").hide(); 901 }); 902 $("#table7") 903 .find("th") 904 .each(function (i) { 905 $("#table7 td:nth-child(" + (i + 1) + ")").prepend( 906 '<span class="table-responsive-stack-thead">' + 907 $(this).text() + 908 "</span> " 909 ); 910 $(".table-responsive-stack-thead").hide(); 911 }); 912 $("#table1, #table2, #table3, #table4, #table5, #table6, #table7").each( 913 function () { 914 var thCount = $(this).find("th").length; 915 var rowGrow = 100 / thCount + "%"; 916 $(this).find("th, td").css("flex-basis", rowGrow); 917 } 918 ); 919 function flexTable() { 920 if ($(window).width() < 991) { 921 $("#table1, #table2, #table3, #table4, #table5, #table6, #table7").each( 922 function (i) { 923 $(this).find(".table-responsive-stack-thead").show(); 924 $(this).find("thead").hide(); 925 } 926 ); 927 } else { 928 $("#table1, #table2, #table3, #table4, #table5, #table6, #table7").each( 929 function (i) { 930 $(this).find(".table-responsive-stack-thead").hide(); 931 $(this).find("thead").show(); 932 } 933 ); 934 } 935 } 936 937 flexTable(); 938 window.onresize = function (event) { 939 flexTable(); 940 }; 941}); 942 943// Table responsive - end 944 945// Close Alert 946$(document).ready(function () { 947 $(".close").click(function () { 948 $("#alert-booking").alert("close"); 949 }); 950 $(".close").click(function () { 951 $("#alert-error").alert("close"); 952 }); 953}); 954 955// tickets hide/show 956$(document).ready(function () { 957 $(".view").click(function () { 958 $(".booking-detials").hide(); 959 $(".view-ticket").show(); 960 }); 961 962 $(".tickets").click(function () { 963 $(".view-ticket").hide(); 964 $(".booking-detials").show(); 965 }); 966}); 967 968//Select seats `clone` row & remove
969$(document).ready(function () { 970 $("#primiumone").on("click", ".addmorerow", function () { 971 let ObjEle1 = $("#primiumone #sectiontwo ul.group-seat-row"); 972 ObjEle1.find("li:first").clone(true).appendTo(ObjEle1); 973 }); 974 $("#primiumone").on("click", "button.remove", function () { 975 if ($("#primiumone button.remove").length > 1) { 976 $(this).parent("li").remove(); 977 } 978 }); 979 980 $("#primiumtwo").on("click", ".addmorerow", function () { 981 let ObjEle2 = $("#primiumtwo #southsection2 ul.group-seat-row"); 982 ObjEle2.find("li:first").clone(true).appendTo(ObjEle2); 983 }); 984 $("#primiumtwo").on("click", "button.remove", function () { 985 if ($("#primiumtwo button.remove").length > 1) { 986 $(this).parent("li").remove(); 987 } 988 }); 989 990 $("#primiumthree").on("click", ".addmoretable", function () { 991 let ObjEle3 = $("#primiumthree ul.group-select-table"); 992 ObjEle3.find("li:first").clone(true).appendTo(ObjEle3); 993 }); 994 $("#primiumthree").on("click", "button.remove_table", function () { 995 if ($("#primiumthree button.remove_table").length > 1) { 996 $(this).parent("li").remove(); 997 } 998 }); 999 1000 $("#primiumfour").on("click", ".addmoretable", function () { 1001 let ObjEle4 = $("#primiumfour ul.group-select-table"); 1002 ObjEle4.find("li:first").clone(true).appendTo(ObjEle4); 1003 }); 1004 $("#primiumfour").on("click", "button.remove_table", function () { 1005 if ($("#primiumfour button.remove_table").length > 1) { 1006 $(this).parent("li").remove(); 1007 } 1008 }); 1009 $("#primiumseven").on("click", ".addmoretable", function () { 1010 let ObjEle4 = $("#primiumseven ul.group-select-table"); 1011 ObjEle4.find("li:first").clone(true).appendTo(ObjEle4); 1012 }); 1013 $("#primiumseven").on("click", "button.remove_table", function () { 1014 if ($("#primiumseven button.remove_table").length > 1) { 1015 $(this).parent("li").remove(); 1016 } 1017 }); 1018 $("#seating_three").on("click", ".addmoretable", function () { 1019 let ObjEle5 = $("#seating_three ul.group-select-table"); 1020 ObjEle5.find("li:first").clone(true).appendTo(ObjEle5); 1021 }); 1022 $("#seating_three").on("click", "button.remove_table", function () { 1023 if ($("#seating_three button.remove_table").length > 1) { 1024 $(this).parent("li").remove(); 1025 } 1026 }); 1027}); 1028//Select seats `clone` row & remove - end 1029 1030// Toast start 1031$(document).ready(function () { 1032 $("#ra12").click(function () { 1033 $(".toast").toast("show"); 1034 }); 1035}); 1036$(document).ready(function () { 1037 $(".available").click(function () { 1038 $("#available").toast("show"); 1039 $("#reserved, #pending").toast("hide"); 1040 }); 1041 $(".reserved").click(function () { 1042 $("#reserved").toast("show"); 1043 $("#available, #pending").toast("hide"); 1044 }); 1045 $(".pending").click(function () { 1046 $("#pending").toast("show"); 1047 $("#available, #reserved").toast("hide"); 1048 }); 1049}); 1050// Toast end 1051 1052// choose photo drag start 1053$(document).ready(function () { 1054 function readFile(input) { 1055 if (input.files && input.files[0]) { 1056 var reader = new FileReader(); 1057 1058 reader.onload = function (e) { 1059 var htmlPreview = 1060 '<img width="200" src="' + 1061 e.target.result + 1062 '" />' + 1063 "<p>" + 1064 input.files[0].name + 1065 "</p>"; 1066 var wrapperZone = $(input).parent(); 1067 var previewZone = $(input).parent().parent().find(".preview-zone"); 1068 var boxZone = $(input) 1069 .parent() 1070 .parent() 1071 .find(".preview-zone") 1072 .find(".box") 1073 .find(".box-body"); 1074 1075 wrapperZone.removeClass("dragover"); 1076 previewZone.removeClass("hidden"); 1077 boxZone.empty(); 1078 boxZone.append(htmlPreview); 1079 }; 1080 1081 reader.readAsDataURL(input.files[0]); 1082 } 1083 } 1084 1085 function reset(e) { 1086 e.wrap("<form>").closest("form").get(0).reset(); 1087 e.unwrap(); 1088 } 1089 1090 $(".dropzone").change(function () { 1091 readFile(this); 1092 }); 1093 1094 $(".dropzone-wrapper").on("dragover", function (e) { 1095 e.preventDefault(); 1096 e.stopPropagation(); 1097 $(this).addClass("dragover"); 1098 }); 1099 1100 $(".dropzone-wrapper").on("dragleave", function (e) { 1101 e.preventDefault(); 1102 e.stopPropagation(); 1103 $(this).removeClass("dragover"); 1104 }); 1105 1106 $(".remove-preview").on("click", function () { 1107 var boxZone = $(this).parents(".preview-zone").find(".box-body"); 1108 var previewZone = $(this).parents(".preview-zone"); 1109 var dropzone = $(this).parents(".form-group").find(".dropzone"); 1110 boxZone.empty(); 1111 previewZone.addClass("hidden"); 1112 reset(dropzone); 1113 }); 1114}); 1115// choose photo drag end 1116 1117//education banner slider 1118// $(document).ready(function () { 1119// $(".breadcrumb-slider").owlCarousel({ 1120// loop: true, 1121// nav: false, 1122// dots: false, 1123// autoplay: true, 1124// slideSpeed: 7000, 1125// autoplayTimeout: 7000, 1126// margin: 0, 1127// responsiveClass: true, 1128// responsive: { 1129// 0: { 1130// items: 1, 1131// }, 1132// }, 1133// }); 1134// }); 1135 1136// Pagination - start 1137if ($("#pagination-container").length) { 1138 var items = $(".common-pagination .content"); 1139 var numItems = items.length; 1140 var perPage = 9; 1141 1142 items.slice(perPage).hide(); 1143 1144 $("#pagination-container").pagination({ 1145 items: numItems, 1146 itemsOnPage: perPage, 1147 prevText: "<img src='images/pre.svg' />", 1148 nextText: "<img src='images/nxt.svg' />", 1149 onPageClick: function (pageNumber) { 1150 var showFrom = perPage * (pageNumber - 1); 1151 var showTo = showFrom + perPage; 1152 items.hide().slice(showFrom, showTo).show(); 1153 }, 1154 }); 1155} 1156// Pagination - end 1157 1158// Execute Tabs start 1159$(document).ready(function () { 1160 var hash = window.location.hash; 1161 if ($(hash).length) { 1162 var new_hash = hash.substring(1); 1163 $(".nav-tabs .nav-link").removeClass("active"); 1164 $(".nav-tabs") 1165 .find('a[href*="' + hash + '"]') 1166 .addClass("active"); 1167 $(".tab-content .tab-pane").removeClass("active"); 1168 $(".tab-content") 1169 .find('.tab-pane[id*="' + new_hash + '"]') 1170 .addClass("active"); 1171 if ($(".nav-tabs").length) { 1172 $("html, body").animate( 1173 { 1174 scrollTop: $(".nav-tabs").offset().top - 150, 1175 }, 1176 2000 1177 ); 1178 } 1179 } 1180}); 1181 1182$("body").on("click", ".plan a", function () { 1183 var hash = $(this).attr("href"); 1184 var new_hash_wo = hash.substr(hash.indexOf("#") + 1); 1185 var new_hash = "#" + new_hash_wo; 1186 if (new_hash != "") { 1187 $(".nav-tabs .nav-link").removeClass("active"); 1188 $(".nav-tabs") 1189 .find('a[href*="' + new_hash + '"]') 1190 .addClass("active"); 1191 $(".tab-content .tab-pane").removeClass("active"); 1192 $(".tab-content") 1193 .find('.tab-pane[id*="' + new_hash_wo + '"]') 1194 .addClass("active"); 1195 $(".navbar-toggler").click(); 1196 $("html, body").animate( 1197 { 1198 scrollTop: $(".nav-tabs").offset().top - 150, 1199 }, 1200 2000 1201 ); 1202 } 1203}); 1204// Execute Tabs end 1205 1206$(document).ready(function () { 1207 if ($(".banner-wrapper").length) { 1208 var thumb = new Swiper(".banner-thumbslider", { 1209 loop: true, 1210 spaceBetween: 0, 1211 slidesPerView: 4, 1212 speed: 1000, 1213 freeMode: true, 1214 watchSlidesProgress: false, 1215 watchSlidesVisibility: true, 1216 allowTouchMove: false, 1217 slideToClickedSlide: false, 1218 breakpoints: { 1219 0: { slidesPerView: 1.1 }, 1220 640: { slidesPerView: 1.5 },
1221 768: { slidesPerView: 2 }, 1222 992: { slidesPerView: 2.5 }, 1223 1200: { 1224 slidesPerView: 4, 1225 pagination: { 1226 el: ".number-pagination", 1227 type: "fraction", 1228 renderFraction: function (current, total) { 1229 return ` 1230 <div class="current">0<span class="${ 1231 current > 10 ? "0" + total : current 1232 }"></span></div> 1233 <span>|</span> 1234 <div class="total">0<span class="${ 1235 total > 10 ? "0" + current : total 1236 }"></span></div> 1237 `; 1238 }, 1239 }, 1240 }, 1241 }, 1242 }); 1243 1244 var bannerslider = new Swiper(".banner-slider", { 1245 loop: true, 1246 slidesPerView: 1, 1247 spaceBetween: 0, 1248 allowTouchMove: false, 1249 slideToClickedSlide: false, 1250 speed: 1500, 1251 autoplay: { 1252 delay: 5000, 1253 disableOnInteraction: false, 1254 }, 1255 navigation: { 1256 nextEl: ".button-next", 1257 prevEl: ".button-prev", 1258 }, 1259 breakpoints: { 1260 1200: { 1261 pagination: { 1262 el: ".dot-pagination", 1263 clickable: true, 1264 }, 1265 }, 1266 }, 1267 // thumbs: { 1268 // swiper: thumb, 1269 // }, 1270 on: { 1271 slideChange: function () { 1272 thumb.slideToLoop(this.realIndex); 1273 }, 1274 }, 1275 }); 1276 // $(".banner-thumbslider .swiper-slide").on("click", function (e) { 1277 // e.preventDefault(); 1278 // e.stopImmediatePropagation(); 1279 // return false; 1280 // }); 1281 // $(".banner-thumbslider").css("pointer-events", "none"); 1282 1283 // thumb.on("click", function () { 1284 // bannerslider.slideToLoop(thumb.clickedIndex); 1285 // }); 1286 } 1287 1288 if ($(".partner-wrapper").length) { 1289 var partnerslider = null; 1290 var resizeTimer; 1291 1292 function initPartnerSlider() { 1293 var $slider = $(".partnerslider"); 1294 var $wrapper = $slider.find(".swiper-wrapper"); 1295 var slideCount = $wrapper.find(".swiper-slide").length; 1296 var viewWidth = window.innerWidth; 1297 1298 var requiredSlides = 6; 1299 if (viewWidth < 640) { 1300 requiredSlides = 2; 1301 } else if (viewWidth < 768) { 1302 requiredSlides = 2; 1303 } else if (viewWidth < 992) { 1304 requiredSlides = 3; 1305 } else if (viewWidth < 1024) { 1306 requiredSlides = 4; 1307 } else if (viewWidth < 1500) { 1308 requiredSlides = 5; 1309 } 1310 1311 if (slideCount <= requiredSlides) { 1312 if (partnerslider) { 1313 partnerslider.destroy(true, true); 1314 partnerslider = null; 1315 } 1316 $slider.addClass("is-centered"); 1317 } else { 1318 $slider.removeClass("is-centered"); 1319 1320 if (!partnerslider) { 1321 partnerslider = new Swiper(".partnerslider", { 1322 speed: 2000, 1323 loop: true, 1324 autoplay: { 1325 delay: 0, 1326 disableOnInteraction: false, 1327 }, 1328 freeMode: true, 1329 freeModeMomentum: false, 1330 allowTouchMove: false, 1331 breakpoints: { 1332 0: { slidesPerView: 2, centeredSlides: true }, 1333 640: { slidesPerView: 2, centeredSlides: true }, 1334 768: { slidesPerView: 3 }, 1335 992: { slidesPerView: 4 }, 1336 1024: { slidesPerView: 5 }, 1337 1500: { slidesPerView: 6 }, 1338 }, 1339 }); 1340 } 1341 } 1342 } 1343 1344 $(window).on("resize", function() { 1345 clearTimeout(resizeTimer); 1346 resizeTimer = setTimeout(function() { 1347 initPartnerSlider(); 1348 }, 150); 1349 }); 1350 1351 initPartnerSlider(); 1352 } 1353 if ($(".related-card-wrapper").length) { 1354 var relatedslider = new Swiper(".relatedslider", { 1355 speed: 1500, 1356 loop: false, 1357 spaceBetween: 20, 1358 autoplay: { 1359 delay: 1500, 1360 disableOnInteraction: false, 1361 }, 1362 freeMode: true, 1363 freeModeMomentum: false, 1364 allowTouchMove: true, 1365 breakpoints: { 1366 0: { 1367 slidesPerView: 1.3, 1368 pagination: { 1369 el: ".swiper-pagination", 1370 clickable: true, 1371 }, 1372 }, 1373 640: { 1374 slidesPerView: 2, 1375 pagination: { 1376 el: ".swiper-pagination", 1377 clickable: true, 1378 }, 1379 }, 1380 768: { 1381 slidesPerView: 2, 1382 pagination: { 1383 el: ".swiper-pagination", 1384 clickable: true, 1385 }, 1386 }, 1387 992: { 1388 slidesPerView: 3, 1389 pagination: { 1390 el: ".swiper-pagination", 1391 clickable: true, 1392 }, 1393 }, 1394 1024: { 1395 slidesPerView: 3, 1396 pagination: { 1397 el: ".swiper-pagination", 1398 clickable: true, 1399 }, 1400 }, 1401 1200: { 1402 slidesPerView: 4, 1403 loop: false, 1404 }, 1405 }, 1406 }); 1407 } 1408 if ( 1409 $( 1410 ".two-box-card, .three-box-card, .four-box-card, .three-border-box-card, .event-three-cards" 1411 ).length 1412 ) { 1413 var swiperInstances = []; 1414 1415 function initializeSwiper() { 1416 var screenWidth = $(window).width(); 1417 1418 if (screenWidth <= 991) { 1419 if (swiperInstances.length === 0) { 1420 $(".boxslider, .eventslider").each(function () { 1421 var swiper = new Swiper(this, { 1422 autoHeight: false, 1423 centeredSlides: false, 1424 slidesPerView: 1, 1425 spaceBetween: 20, 1426 pagination: { 1427 el: ".swiper-pagination", 1428 clickable: true, 1429 }, 1430 breakpoints: { 1431 0: { 1432 slidesPerView: 1, 1433 }, 1434 640: { 1435 slidesPerView: 1.5, 1436 }, 1437 }, 1438 }); 1439 swiperInstances.push(swiper); 1440 }); 1441 } 1442 return; 1443 } 1444
1445 swiperInstances.forEach(function (swiper) { 1446 if (swiper && typeof swiper.destroy === "function") { 1447 swiper.destroy(true, true); 1448 } 1449 }); 1450 swiperInstances = []; 1451 } 1452 1453 initializeSwiper(); 1454 $(window).on("resize", initializeSwiper); 1455 } 1456 if ($(".tab-with-accordion").length) { 1457 const $tabs = $(".tab"); 1458 const $contents = $(".tab-content"); 1459 const $accItems = $(".accordion-item"); 1460 const $accHeaders = $(".accordion-header"); 1461 const $accContents = $(".accordion-content"); 1462 1463 $tabs.on("click", function () { 1464 const target = $(this).data("target"); 1465 1466 $tabs.removeClass("active"); 1467 $contents.removeClass("active"); 1468 1469 $(this).addClass("active"); 1470 $("#" + target).addClass("active"); 1471 }); 1472 1473 $accHeaders.on("click", function () { 1474 const $parentItem = $(this).parent(); 1475 const $content = $(this).next(); 1476 const isActive = $parentItem.hasClass("active"); 1477 1478 $accItems.removeClass("active"); 1479 $accContents.removeClass("active"); 1480 1481 if (!isActive) { 1482 $parentItem.addClass("active"); 1483 $content.addClass("active"); 1484 1485 const headerOffset = 141.2; 1486 const offsetPosition = $parentItem.offset().top - headerOffset; 1487 1488 $("html, body").animate({ scrollTop: offsetPosition }, 400); 1489 } 1490 }); 1491 } 1492 1493 if ($(".event-tab-with-accordion").length) { 1494 const $tabs = $(".event-tab"); 1495 const $contents = $(".event-tab-content"); 1496 const $accItems = $(".event-accordion-item"); 1497 const $accHeaders = $(".event-accordion-header"); 1498 const $accContents = $(".event-accordion-content"); 1499 1500 $tabs.on("click", function () { 1501 const target = $(this).data("target"); 1502 if (!target) { 1503 return; 1504 } 1505 $tabs.removeClass("active"); 1506 $contents.removeClass("active"); 1507 $(this).addClass("active"); 1508 $("#" + target).addClass("active"); 1509 }); 1510 1511 $accHeaders.on("click", function () { 1512 const $parentItem = $(this).parent(); 1513 const $content = $(this).next(); 1514 const isActive = $parentItem.hasClass("active"); 1515 1516 $accItems.removeClass("active"); 1517 $accContents.removeClass("active"); 1518 1519 if (!isActive) { 1520 $parentItem.addClass("active"); 1521 $content.addClass("active"); 1522 1523 const headerOffset = 141.2; 1524 const offsetPosition = $parentItem.offset().top - headerOffset; 1525 1526 $("html, body").animate({ scrollTop: offsetPosition }, 400); 1527 } 1528 }); 1529 } 1530 1531 if ($(".upcoming-menu, .indoor-menu").length) { 1532 var menuslide = new Swiper(".menuslide", { 1533 speed: 1000, 1534 loop: false, 1535 spaceBetween: 20, 1536 slidesPerView: 1, 1537 pagination: { 1538 el: ".swiper-pagination", 1539 clickable: true, 1540 }, 1541 }); 1542 } 1543 if ($(".list-dropdown").length) { 1544 $(".dropdown-btn").on("click", function () { 1545 var $dropdown = $(this).next(); 1546 $dropdown.css("display") === "none" || $dropdown.css("display") === "" 1547 ? $dropdown.css("display", "flex") 1548 : $dropdown.css("display", "none"); 1549 }); 1550 } 1551 if ($(".header-top").length) { 1552 $(".event-header").on("click", function () { 1553 const $content = $(".event-content"); 1554 const $btn = $(".toggle-btn"); 1555 1556 $content.css("display") === "flex" 1557 ? $content.css("display", "none") 1558 : $content.css("display", "flex"); 1559 1560 $btn.toggleClass("active"); 1561 }); 1562 } 1563});
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.