1jQuery(window).on("load", function ($) { 2 $ = jQuery; 3 const lastElement = $('.block-block-area-wide > .acf-innerblocks-container > :last-child')[0]; 4 if (lastElement) { 5 const lastElementClass = lastElement.classList[0]; 6 $('#main-content').addClass('last-' + lastElementClass); 7 } 8}); 9 10jQuery(document).bind( 11 "gform_post_render", 12 function (event, formId, currentPage) { 13 if (formId == 8) { 14 gf_global["number_formats"][8] = { 15 1: { price: false, value: false }, 16 2: { price: false, value: false }, 17 3: { price: false, value: false }, 18 11: { price: false, value: false }, 19 8: { price: false, value: false }, 20 13: { price: false, value: false }, 21 4: { price: false, value: false }, 22 9: { price: false, value: false }, 23 10: { price: false, value: false }, 24 16: { price: false, value: false }, 25 }; 26 if (window["jQuery"]) { 27 if (!window["gf_form_conditional_logic"]) 28 window["gf_form_conditional_logic"] = new Array(); 29 window["gf_form_conditional_logic"][8] = { 30 logic: { 31 16: { 32 field: { 33 actionType: "show", 34 logicType: "all", 35 rules: [{ fieldId: "8", operator: "is", value: "1" }], 36 }, 37 nextButton: null, 38 section: null, 39 }, 40 }, 41 dependents: { 16: [16] }, 42 animation: 0, 43 defaults: { 9: "7010H0000011DnRQAU", 16: "Patterns " }, 44 fields: { 45 1: [], 46 2: [], 47 3: [], 48 11: [], 49 8: [16], 50 13: [], 51 4: [], 52 9: [], 53 10: [], 54 16: [], 55 }, 56 }; 57 if (!window["gf_number_format"]) 58 window["gf_number_format"] = "decimal_dot"; 59 jQuery(document).ready(function () { 60 gf_apply_rules(8, [16], true); 61 jQuery("#gform_wrapper_8").show(); 62 jQuery(document).trigger("gform_post_conditional_logic", [ 63 8, 64 null, 65 true, 66 ]); 67 }); 68 } 69 } 70 } 71); 72jQuery(document).bind( 73 "gform_post_conditional_logic", 74 function (event, formId, fields, isInit) { } 75); 76jQuery(document).bind( 77 "gform_post_render", 78 function (event, formId, currentPage) { 79 if (formId == 7) { 80 gf_global["number_formats"][7] = { 81 1: { price: false, value: false }, 82 2: { price: false, value: false }, 83 3: { price: false, value: false }, 84 4: { price: false, value: false }, 85 8: { price: false, value: false }, 86 11: { price: false, value: false }, 87 7: { price: false, value: false }, 88 14: { price: "decimal_dot", value: false }, 89 12: { price: false, value: false }, 90 13: { price: false, value: false }, 91 10: { price: false, value: false }, 92 5: { price: false, value: false }, 93 6: { price: false, value: false }, 94 }; 95 if (window["jQuery"]) { 96 if (!window["gf_form_conditional_logic"]) 97 window["gf_form_conditional_logic"] = new Array(); 98 window["gf_form_conditional_logic"][7] = { 99 logic: { 100 11: { 101 field: { 102 actionType: "show", 103 logicType: "all", 104 rules: [{ fieldId: "8", operator: "is", value: "Yes" }], 105 }, 106 nextButton: null, 107 section: null, 108 }, 109 7: { 110 field: { 111 actionType: "show", 112 logicType: "all", 113 rules: [{ fieldId: "8", operator: "is", value: "Yes" }], 114 }, 115 nextButton: null, 116 section: null, 117 }, 118 14: { 119 field: { 120 actionType: "show", 121 logicType: "all", 122 rules: [{ fieldId: "8", operator: "is", value: "Yes" }], 123 }, 124 nextButton: null, 125 section: null, 126 }, 127 12: { 128 field: { 129 actionType: "show", 130 logicType: "all", 131 rules: [{ fieldId: "8", operator: "is", value: "Yes" }], 132 }, 133 nextButton: null, 134 section: null, 135 }, 136 13: { 137 field: { 138 actionType: "show", 139 logicType: "all", 140 rules: [{ fieldId: "12", operator: "is", value: "Yes" }], 141 }, 142 nextButton: null, 143 section: null, 144 }, 145 10: { 146 field: { 147 actionType: "show", 148 logicType: "all", 149 rules: [{ fieldId: "8", operator: "is", value: "Yes" }], 150 }, 151 nextButton: null, 152 section: null, 153 }, 154 }, 155 dependents: { 156 11: [11], 157 7: [7], 158 14: [14], 159 12: [12], 160 13: [13], 161 10: [10], 162 }, 163 animation: 0, 164 defaults: {
165 7: { 7.1: "", 7.2: "", 7.3: "", 7.4: "", 7.5: "", 7.6: "" }, 166 14: { 14.1: "", 14.2: "$60.00", 14.3: "" }, 167 10: { 168 10.1: "", 169 "10.2_month": "", 170 "10.2_year": "", 171 10.3: "", 172 10.4: "", 173 10.5: "", 174 }, 175 5: "7010H0000011DmTQAU", 176 }, 177 fields: { 178 1: [], 179 2: [], 180 3: [], 181 4: [], 182 8: [11, 7, 14, 12, 10], 183 11: [], 184 7: [], 185 14: [], 186 12: [13], 187 13: [], 188 10: [], 189 5: [], 190 6: [], 191 }, 192 }; 193 if (!window["gf_number_format"]) 194 window["gf_number_format"] = "decimal_dot"; 195 jQuery(document).ready(function () { 196 gf_apply_rules(7, [11, 7, 14, 12, 13, 10], true); 197 jQuery("#gform_wrapper_7").show(); 198 jQuery(document).trigger("gform_post_conditional_logic", [ 199 7, 200 null, 201 true, 202 ]); 203 }); 204 } 205 if (window["gformInitPriceFields"]) 206 jQuery(document).ready(function () { 207 gformInitPriceFields(); 208 }); 209 if (!window["gf_cc_rules"]) { 210 window["gf_cc_rules"] = new Array(); 211 } 212 window["gf_cc_rules"] = { 213 amex: ["34", "37"], 214 discover: ["6011", "622", "64", "65"], 215 mastercard: [ 216 "51", 217 "52", 218 "53", 219 "54", 220 "55", 221 "22", 222 "23", 223 "24", 224 "25", 225 "26", 226 "270", 227 "271", 228 "272", 229 ], 230 visa: ["4", "417500", "4917", "4913", "4508", "4844"], 231 jcb: ["35"], 232 maestro: ["5018", "5020", "5038", "6304", "6759", "6761"], 233 }; 234 jQuery(document).ready(function () { 235 { 236 gformMatchCard("input_7_10_1"); 237 } 238 }); 239 new GFStripe({ 240 apiKey: "pk_live_WUen4KMvPK7aGkT3IDMXRPDd", 241 formId: 7, 242 isAjax: true, 243 stripe_payment: "stripe.js", 244 ccFieldId: 10, 245 ccPage: 1, 246 cardLabels: { 247 amex: "American Express", 248 discover: "Discover", 249 mastercard: "MasterCard", 250 visa: "Visa", 251 jcb: "JCB", 252 maestro: "Maestro", 253 }, 254 currency: "USD", 255 feeds: { 0: { feedId: "74" } }, 256 }); 257 new GFFrontendFeeds({ 258 formId: 7, 259 feeds: [ 260 { 261 feedId: "74", 262 addonSlug: "gravityformsstripe", 263 conditionalLogic: false, 264 isSingleFeed: true, 265 }, 266 ], 267 }); 268 } 269 } 270); 271jQuery(document).bind( 272 "gform_post_conditional_logic", 273 function (event, formId, fields, isInit) { } 274); 275jQuery(document).bind( 276 "gform_post_render", 277 function (event, formId, currentPage) { 278 if (formId == 10) { 279 gf_global["number_formats"][10] = { 280 1: { price: false, value: false }, 281 4: { price: "decimal_dot", value: false }, 282 11: { price: "decimal_dot", value: false }, 283 12: { price: false, value: false }, 284 3: { price: false, value: false }, 285 9: { price: false, value: false }, 286 10: { price: false, value: false }, 287 6: { price: false, value: false }, 288 15: { price: false, value: false }, 289 16: { price: false, value: false }, 290 5: { price: false, value: false }, 291 17: { price: false, value: false }, 292 }; 293 if (window["jQuery"]) { 294 if (!window["gf_form_conditional_logic"]) 295 window["gf_form_conditional_logic"] = new Array(); 296 window["gf_form_conditional_logic"][10] = { 297 logic: { 298 11: { 299 field: { 300 actionType: "show", 301 logicType: "any", 302 rules: [{ fieldId: "4", operator: "is", value: "Other" }], 303 }, 304 nextButton: null, 305 section: null, 306 }, 307 }, 308 dependents: { 11: [11] }, 309 animation: 0, 310 defaults: { 311 3: { 312 3.1: "", 313 "3.2_month": "", 314 "3.2_year": "", 315 3.3: "", 316 3.4: "", 317 3.5: "", 318 }, 319 9: { 9.2: "", 9.3: "", 9.4: "", 9.6: "", 9.8: "" }, 320 10: { 10.1: "", 10.2: "", 10.3: "", 10.4: "", 10.5: "",
32010.6: "" }, 321 5: "7010H0000011DmiQAE", 322 }, 323 fields: { 324 1: [], 325 4: [11], 326 11: [], 327 12: [], 328 3: [], 329 9: [], 330 10: [], 331 6: [], 332 15: [], 333 16: [], 334 5: [], 335 17: [], 336 }, 337 }; 338 if (!window["gf_number_format"]) 339 window["gf_number_format"] = "decimal_dot"; 340 jQuery(document).ready(function () { 341 gf_apply_rules(10, [11], true); 342 jQuery("#gform_wrapper_10").show(); 343 jQuery(document).trigger("gform_post_conditional_logic", [ 344 10, 345 null, 346 true, 347 ]); 348 }); 349 } 350 if (window["gformInitPriceFields"]) 351 jQuery(document).ready(function () { 352 gformInitPriceFields(); 353 }); 354 if (!window["gf_cc_rules"]) { 355 window["gf_cc_rules"] = new Array(); 356 } 357 window["gf_cc_rules"] = { 358 amex: ["34", "37"], 359 discover: ["6011", "622", "64", "65"], 360 mastercard: [ 361 "51", 362 "52", 363 "53", 364 "54", 365 "55", 366 "22", 367 "23", 368 "24", 369 "25", 370 "26", 371 "270", 372 "271", 373 "272", 374 ], 375 visa: ["4", "417500", "4917", "4913", "4508", "4844"], 376 jcb: ["35"], 377 maestro: ["5018", "5020", "5038", "6304", "6759", "6761"], 378 }; 379 jQuery(document).ready(function () { 380 { 381 gformMatchCard("input_10_3_1"); 382 } 383 }); 384 new GFStripe({ 385 apiKey: "pk_live_WUen4KMvPK7aGkT3IDMXRPDd", 386 formId: 10, 387 isAjax: false, 388 stripe_payment: "stripe.js", 389 ccFieldId: 3, 390 ccPage: 1, 391 cardLabels: { 392 amex: "American Express", 393 discover: "Discover", 394 mastercard: "MasterCard", 395 visa: "Visa", 396 jcb: "JCB", 397 maestro: "Maestro", 398 }, 399 currency: "USD", 400 feeds: { 401 0: { feedId: "45" }, 402 1: { feedId: "46" }, 403 2: { feedId: "47" }, 404 }, 405 }); 406 new GFFrontendFeeds({ 407 formId: 10, 408 feeds: [ 409 { 410 feedId: "45", 411 addonSlug: "gravityformsstripe", 412 conditionalLogic: { 413 actionType: "show", 414 logicType: "all", 415 rules: [{ fieldId: "1", operator: "is", value: "One Time" }], 416 }, 417 isSingleFeed: true, 418 }, 419 { 420 feedId: "46", 421 addonSlug: "gravityformsstripe", 422 conditionalLogic: { 423 actionType: "show", 424 logicType: "all", 425 rules: [{ fieldId: "1", operator: "is", value: "Monthly" }], 426 }, 427 isSingleFeed: true, 428 }, 429 { 430 feedId: "47", 431 addonSlug: "gravityformsstripe", 432 conditionalLogic: { 433 actionType: "show", 434 logicType: "all", 435 rules: [{ fieldId: "1", operator: "is", value: "Annually" }], 436 }, 437 isSingleFeed: true, 438 }, 439 ], 440 }); 441 } 442 } 443); 444jQuery(document).bind( 445 "gform_post_conditional_logic", 446 function (event, formId, fields, isInit) { } 447); 448jQuery(document).ready(function ($) { 449 $(" .read-more").click(function (e) { 450 e.preventDefault(); 451 // $('.key-program-initiatives-slider')[0].slick.refresh() 452 if ($(this).hasClass("show-less")) { 453 $(this).text("Read More +"); 454 $(this).removeClass("show-less"); 455 } else { 456 $(this).text("Show Less -"); 457 $(this).addClass("show-less"); 458 } 459 $(this) 460 .prev() 461 .slideToggle(400, function () { 462 $(".slider-stories")[0].slick.refresh(); 463 }); 464 }); 465 466 /* ========================================================================== 467 MOBILE MENU 468 ==========================================================================*/ 469 //IE 470 471 var ie = $("html").hasClass("ie"); 472 //IE check 473 if (!$("html").hasClass("ie8")) { 474 //Mobile menu 475 $("#mmenu").mmenu({ 476 slidingSubmenus: false, 477 offCanvas: { 478 position: "left", 479 zposition: "front", 480 }, 481 }); 482 $(".mm-subopen").attr("aria-label", "Open Submenu"); 483 } 484 485 // jQuery('.mgf_disabled :input').prop('disabled', true).trigger("chosen:updated"); 486 // jQuery('.gform_wrapper form').submit(function() { 487 // console.log('ok'); 488 // jQuery('.mgf_disabled :input').prop('disabled', false); 489 // }); 490 491 //$("#mobile-menu").mmenu({}); 492 // Shrinking Header on Scroll 493 $(window).on("scroll touchmove", function () { 494 $(".header-lower").toggleClass("tiny", $(document).scrollTop() > 1); 495 $("#header-alt").toggleClass("dark-bg", $(document).scrollTop() > 1); 496 }); 497 // $(document).on("scroll", function(){ 498 // if 499 // ($(document).scrollTop() > 1){ 500 // $("header-lower").addClass("tiny"); 501 // $("#header-alt").addClass("dark-bg"); 502 // // updateSliderMargin(); 503 // } 504 // else 505 // { 506 // $("header-lower").removeClass("tiny"); 507 // // updateSliderMargin(); 508 // } 509 // }); 510
511 // if ($(".kal-stories-wrapper").hasClass("podcast")) { 512 // // $(this).text("test"); 513 // // â$(this).addClass("test"); 514 // $( ".podcast a" ).text( "Listesn Now" ); 515 // } 516 // 517 // if ($(".kal-stories-wrapper").hasClass("video")) { 518 // // $(this).text("test"); 519 // // â$(this).addClass("test"); 520 // $( ".video a" ).text( "Watch Now" ); 521 // } 522 523 // $(".data-slider-module .data-slider").slick({ 524 // infinite: true, 525 // slidesToShow: 4, 526 // slidesToScroll: 1, 527 // prevArrow: '<div type="button" class="main-prev"></div>', 528 // nextArrow: '<div type="button" class="main-next"></div>', 529 // accessibility: false, 530 // responsive: [ 531 // { 532 // breakpoint: 1024, 533 // settings: { 534 // slidesToShow: 3, 535 // slidesToScroll: 3, 536 // infinite: true, 537 // // dots: true 538 // }, 539 // }, 540 // { 541 // breakpoint: 600, 542 // settings: { 543 // slidesToShow: 2, 544 // slidesToScroll: 2, 545 // }, 546 // }, 547 // { 548 // breakpoint: 480, 549 // settings: { 550 // slidesToShow: 1, 551 // slidesToScroll: 1, 552 // }, 553 // }, 554 // ], 555 // }); 556 557 $(".module-list .list-slider").slick({ 558 // infinite: true, 559 slidesToShow: 3, 560 slidesToScroll: 1, 561 prevArrow: '<div type="button" class="main-prev"></div>', 562 nextArrow: '<div type="button" class="main-next"></div>', 563 accessibility: false, 564 565 responsive: [ 566 { 567 breakpoint: 1024, 568 settings: { 569 slidesToShow: 2, 570 slidesToScroll: 2, 571 }, 572 }, 573 { 574 breakpoint: 720, 575 settings: { 576 slidesToShow: 1, 577 slidesToScroll: 1, 578 }, 579 }, 580 ], 581 }); 582 $(".stories-wrapper").slick({ 583 // infinite: true, 584 slidesToShow: 5, 585 slidesToScroll: 1, 586 prevArrow: '<div type="button" class="main-prev"></div>', 587 nextArrow: '<div type="button" class="main-next"></div>', 588 accessibility: false, 589 responsive: [ 590 { 591 breakpoint: 1024, 592 settings: { 593 slidesToShow: 4, 594 slidesToScroll: 1, 595 }, 596 }, 597 { 598 breakpoint: 900, 599 settings: { 600 slidesToShow: 3, 601 slidesToScroll: 1, 602 }, 603 }, 604 { 605 breakpoint: 720, 606 settings: { 607 slidesToShow: 2, 608 slidesToScroll: 1, 609 }, 610 }, 611 { 612 breakpoint: 520, 613 settings: { 614 slidesToShow: 1, 615 slidesToScroll: 1, 616 }, 617 }, 618 ], 619 }); 620 621 $(".header-callouts").slick({ 622 infinite: true, 623 slidesToShow: 3, 624 slidesToScroll: 1, 625 prevArrow: '<div type="button" class="main-prev"></div>', 626 nextArrow: '<div type="button" class="main-next"></div>', 627 accessibility: false, 628 629 responsive: [ 630 { 631 breakpoint: 1020, 632 settings: { 633 slidesToShow: 2, 634 slidesToScroll: 1, 635 infinite: true, 636 // dots: true 637 }, 638 }, 639 { 640 breakpoint: 700, 641 settings: { 642 slidesToShow: 1, 643 slidesToScroll: 1, 644 }, 645 }, 646 ], 647 }); 648 649 // $('.ann-module-7 .slider-wrapper').slick({ 650 // infinite: true, 651 // slidesToShow: 3, 652 // slidesToScroll: 1, 653 // prevArrow:'<div type="button" class="main-prev"></div>', 654 // nextArrow:'<div type="button" class="main-next"></div>', 655 // responsive: [ 656 // { 657 // breakpoint: 1020, 658 // settings: { 659 // slidesToShow: 2, 660 // slidesToScroll: 1, 661 // infinite: true, 662 // // dots: true 663 // } 664 // }, 665 // { 666 // breakpoint: 700, 667 // settings: { 668 // slidesToShow: 1, 669 // slidesToScroll: 1 670 // } 671 // } 672 // ] 673 // }); 674 $(".ann-module-6 .slider-stories").slick({ 675 infinite: true, 676 slidesToShow: 1, 677 slidesToScroll: 1, 678 adaptiveHeight: false, 679 prevArrow: '<div type="button" class="main-prev"></div>', 680 nextArrow: '<div type="button" class="main-next"></div>', 681 accessibility: false, 682 683 684 // responsive: [ 685 // { 686 // breakpoint: 790, 687 // settings: { 688 // adaptiveHeight: true 689 // } 690 // } 691 // ] 692 }); 693 // $('.ann-module-6 .slider-storiess').slick({ 694 // infinite: false, 695 // slidesToShow: 1, 696 // slidesToScroll: 1, 697 // adaptiveHeight: true, 698 // prevArrow:'<div type="button" class="main-prev"></div>', 699 // nextArrow:'<div type="button" class="main-next"></div>', 700 // // responsive: [ 701 // // { 702 // // breakpoint: 790, 703 // // settings: { 704 // // adaptiveHeight: true 705 // // } 706 // // } 707 // // ] 708 // }); 709 710 $(".ann-module-5 .slider-features").slick({ 711 infinite: false, 712 slidesToShow: 2, 713 slidesToScroll: 1, 714 prevArrow: '<div type="button" class="main-prev"></div>', 715 nextArrow: '<div type="button" class="main-next"></div>', 716 adaptiveHeight: true, 717 accessibility: false, 718 719 responsive: [ 720 { 721 breakpoint: 810, 722 settings: { 723 slidesToShow: 1, 724 slidesToScroll: 1, 725 infinite: true, 726 // dots: true 727 }, 728 }, 729 ], 730 }); 731 732 if ($("body").hasClass("page-template-template-events-landing")) { 733 var eventMixer = mixitup("#event-mix-container", { 734 selectors: { 735 target: ".mix", 736 }, 737 load: { 738 filter: ".latest", 739 }, 740 animation: { 741 duration: 300, 742 }, 743 }); 744 } 745 if ($("body").hasClass("page-template-template-news-landing")) { 746 var blogMixer = mixitup("#blog-mix-container", { 747 selectors: { 748 target: ".mix", 749 }, 750 load: { 751 filter: ".latest", 752 }, 753 animation: { 754 duration: 300, 755 }, 756 }); 757 } 758 if ($("body").hasClass("page-template-template-fellow-stories-landing")) { 759 var fellowMixer = mixitup("#fellows-mix-container", { 760 selectors: { 761 target: ".mix", 762 }, 763 // load: { 764 // filter: '.latest' 765 // }, 766 animation: { 767 duration: 300, 768 }, 769 }); 770 } 771 772 // As we have no server-side application or routes, we will use 773 // a URL "hash" for this demo, but we chould just as easily use 774 // a URL route segment. 775 // As we will use the target selector in several parts of the demo, 776 // we will declare it as a variable here. 777 var targetSelector = ".mix"; 778 /** 779 * Reads a hash from the URL (if present), and converts it into a class 780 * selector string. E.g "#green" -> ".green". Otherwise, defaults 781 * to the targetSelector, equivalent to "all" 782 * 783 * @return {string} 784 */ 785 function getSelectorFromHash() { 786 var hash = window.location.hash.replace(/^#/g, ""); 787 var selector = hash ? "." + hash : targetSelector; 788 return selector; 789 } 790 function testThis() { 791 if ( 792 $("#main-controls .sub-filter-cohort").hasClass( 793 "mixitup-control-active" 794 ) || 795 $("#secondary-filter-cohort .filter").hasClass("mixitup-control-active") 796 ) { 797 // console.log('test'); 798 $("#secondary-filter-cohort").addClass("cool"); 799 $("#secondary-filter-cohort").show("fast"); 800 } else { 801 $("#secondary-filter-cohort").hide("fast"); 802 } 803 804 if ( 805 $("#main-controls .sub-filter-trustees").hasClass( 806 "mixitup-control-active" 807 ) || 808 $("#secondary-filter-trustees .filter").hasClass("mixitup-control-active") 809 ) { 810 // console.log('test'); 811 $("#secondary-filter-trustees").addClass("cool"); 812 $("#secondary-filter-trustees").show("fast"); 813 } else { 814 $("#secondary-filter-trustees").hide("fast"); 815 } 816 } 817 818 /** 819 * Updates the URL whenever the current filter changes. 820 * 821 * @param {mixitup.State} state 822 * @return {void} 823 */ 824 function setHash(state) { 825 var selector = state.activeFilter.selector; 826 var newHash = "#" + selector.replace(/^./g, ""); 827 if (selector === targetSelector && window.location.hash) { 828 // Equivalent to filter "all", remove the hash 829 history.pushState(null, document.title, window.location.pathname); // or history.replaceState() 830 } else if ( 831 newHash !== window.location.hash && 832 selector !== targetSelector 833 ) { 834 // Change the hash 835 history.pushState( 836 null, 837 document.title, 838 window.location.pathname + newHash 839 ); // or history.replaceState() 840 } 841 } 842 843 if ($("body").hasClass("page-template-template-bio-landing")) { 844 var bioMainMixer = mixitup("#bios-mix-container", { 845 selectors: { 846 target: ".mix", 847 }, 848 849 load: { 850 filter: getSelectorFromHash(), // Ensure that the mixer's initial filter matches the URL on startup 851 }, 852 callbacks: { 853 // onMixEnd: setHash, // Call the setHash() method at the end of each operation 854 onMixEnd: testThis, // Call the setHash() method at the end of each operation 855 }, 856 animation: { 857 duration: 300, 858 }, 859 }); 860 // var bioSecMixer = mixitup('#bios-mix-container', { 861 // selectors: { 862 // target: '.mix' 863 // }, 864 // // load: { 865 // // filter: '.latest' 866 // // }, 867 // animation: { 868 // duration: 300 869 // }, 870 // }); 871 872 window.onhashchange = function () { 873 var selector = getSelectorFromHash(); 874 if (selector === mixer.getState().activeFilter.selector) return; // no change 875 mixer.filter(selector); 876 }; 877 } 878 879 // if($('p').hasClass('inline-left') || $('p').hasClass('inline-right')) { 880 // $(this).wrap( "<div class='big-quote'></div>" ) 881 // } 882 883 $(".audio-btn").on("click", function (e) { 884 e.preventDefault(); 885 $(this).parent().next().css({ display: "block" }); 886 // find('audio').fadeIn(); 887 }); 888 889 $(".tab").on("click", function (e) { 890 e.preventDefault(); 891 $(".tab, .panel").removeClass("active"); 892 $(this) 893 .add( 894 "#" + 895 $(this) 896 .attr("id") 897 .replace(/\s*tab\s*/, "panel") 898 ) 899 .addClass("active"); 900 $(this).focus(); 901 }); 902 903 // Configure/customize these variables. 904 // var showChar = 100; // How many characters are shown by default 905 // var ellipsestext = "..."; 906 var moretext = "Expand"; 907 var lesstext = "Less"; 908 909 // $('.more').each(function() { 910 // var content = $(this).html(); 911 // 912 // if(content.length > showChar) { 913 // 914 // var c = content.substr(0, showChar); 915 // var h = content.substr(showChar, content.length - showChar); 916 // 917 // var html = c + '<span class="moreellipses">' + ellipsestext+ ' </span><span class="morecontent"><span>' + h + '</span> <a href="" class="morelink">' + moretext + '</a></span>'; 918 // 919 // $(this).html(html); 920 // } 921 // 922 // }); 923 924 $(".topic-section .expand-link button").click(function () { 925 if ($(this).hasClass("less")) { 926 $(this).removeClass("less"); 927 $(this).html(moretext); 928 } else { 929 $(this).addClass("less"); 930 $(this).html(lesstext); 931 } 932 $(this).parent().parent().next().toggle(); 933 $(this).prev().toggle(); 934 return false;
935 }); 936 937 $(".module-pic-text .expand-link button").click(function () { 938 const text = $(this).parent().prev(); 939 if ($(this).hasClass("less")) { 940 $(this).removeClass("less"); 941 $(this).html(moretext); 942 $(this).attr('aria-expanded', 'false'); 943 text[0].style.maxHeight = null; 944 } else { 945 $(this).addClass("less"); 946 $(this).html(lesstext); 947 $(this).attr('aria-expanded', 'true'); 948 text.css('max-height', text[0].scrollHeight + 'px'); 949 } 950 text.toggleClass('expanded'); 951 $(this).prev().toggleClass('expanded'); 952 return false; 953 }); 954 $(".item-block .expand-link a").click(function () { 955 if ($(this).hasClass("less")) { 956 $(this).removeClass("less"); 957 $(this).html(moretext); 958 } else { 959 $(this).addClass("less"); 960 $(this).html(lesstext); 961 } 962 $(this).parent().prev().toggle(); 963 $(this).prev().toggle(); 964 return false; 965 }); 966 967 // $(".expand-link a").click(function(){ 968 // if($(this).hasClass("less")) { 969 // $(this).removeClass("less"); 970 // $(this).html(moretext); 971 // } else { 972 // $(this).addClass("less"); 973 // $(this).html(lesstext); 974 // } 975 // $(this).parent().prev().toggle(); 976 // $(this).prev().toggle(); 977 // return false; 978 // }); 979 980 $(document).on("click", ".trigger", function (event) { 981 event.preventDefault(); 982 var modalid = $(this).attr("href"); 983 console.log($(this).attr("href")); 984 $(modalid).iziModal("open"); 985 }); 986 987 var modals = $("[id^=modal-name-]"); 988 // console.log(modals.length); 989 modals.each(function (index, value) { 990 $(this).iziModal({ 991 overlayClose: true, 992 width: 1050, 993 autoOpen: false, 994 overlayColor: "rgba(0, 0, 0, 0.6)", 995 }); 996 }); 997 998 var modalsGal = $("[id^=modal-gal-]"); 999 // console.log(modals.length); 1000 modalsGal.each(function (index, value) { 1001 $(this).iziModal({ 1002 overlayClose: true, 1003 width: 1050, 1004 autoOpen: false, 1005 group: "group-gal", 1006 overlayColor: "rgba(0, 0, 0, 0.8)", 1007 }); 1008 }); 1009 1010 var modalId = window.location.hash; 1011 if ($(modalId).length > 0) { 1012 $(modalId).iziModal("open"); 1013 } 1014 1015 $(".toggle-util > a").click(function (event) { 1016 event.preventDefault(); 1017 }); 1018 1019 // $("#modal-iframe").iziModal({ 1020 // iframe: true, 1021 // iframeHeight: 420, 1022 // iframeURL: "https://www.youtube.com/embed/G4m8gd2Cs00" 1023 // }); 1024 if ($("#modal-iframe").length) { 1025 $("#modal-iframe").iziModal({ 1026 iframe: true, 1027 iframeHeight: 420, 1028 iframeURL: "https://player.vimeo.com/video/359789946", 1029 }); 1030 } 1031 1032 var util_toggle = $(".util-toggle"); 1033 var prev_target = ""; 1034 1035 //display search bar on icon click 1036 $(".toggle-util").on("click", function () { 1037 var target = $(this).data("target"); 1038 var clicked = $(this); 1039 $(this).toggleClass("open-search"); 1040 function close_util() { 1041 util_toggle.slideUp(300); 1042 $(".toggle-util").removeClass("opened"); 1043 } 1044 function open_util() { 1045 $(target).slideDown(300); 1046 clicked.addClass("opened"); 1047 $(target).find("input").first().focus(); 1048 } 1049 if ($(this).hasClass("opened")) { 1050 close_util(); 1051 } else { 1052 close_util(); 1053 open_util(); 1054 } 1055 prev_target = target; 1056 }); 1057 1058 if ( 1059 $("body").hasClass("page-template-template-news-archive") || 1060 $("body").hasClass("page-template-template-events-archive") || 1061 $("body").hasClass("archive") 1062 ) { 1063 $(".archive-table table") 1064 .on("init.dt", function () { 1065 $(".archive-search").html($(".dataTables_filter")); 1066 $(".dataTables_filter label").append( 1067 '<div class = "btn submit">Search</div>' 1068 ); 1069 $(".archive-table").append($(".dataTables_length")); 1070 $(".dataTables_filter input").attr( 1071 "placeholder", 1072 "Enter Title or Keyword" 1073 ); 1074 }) 1075 .DataTable({ 1076 oLanguage: { 1077 oPaginate: { 1078 sNext: '<span class="pagination-default"></span>', 1079 sPrevious: '<span class="pagination-default"></span>', 1080 }, 1081 }, 1082 // "order": [[ 2, "desc" ]], 1083 info: false, 1084 responsive: true, 1085 1086 language: { 1087 lengthMenu: "View _MENU_ Per Page", 1088 }, 1089 }); 1090 } 1091 if ($("body").hasClass("page-template-template-issue-archive")) { 1092 $(".archive-table table") 1093 .on("init.dt", function () { 1094 $(".archive-search").html($(".dataTables_filter")); 1095 $(".dataTables_filter label").append( 1096 '<div class = "btn submit">Search</div>' 1097 ); 1098 $(".archive-table").append($(".dataTables_length")); 1099 $(".dataTables_filter input").attr( 1100 "placeholder", 1101 "Enter Title or Keyword" 1102 ); 1103 }) 1104 .DataTable({ 1105 oLanguage: { 1106 oPaginate: { 1107 sNext: '<span class="pagination-default"></span>', 1108 sPrevious: '<span class="pagination-default"></span>', 1109 }, 1110 }, 1111 order: [[2, "desc"]], 1112 info: false, 1113 responsive: true, 1114 1115 language: { 1116 lengthMenu: "View _MENU_ Per Page", 1117 }, 1118 }); 1119 } 1120 1121 $(".btn-course .btn-reg").click(function (e) { 1122 e.preventDefault(); 1123 if ($(".form-pay").hasClass("show-me")) { 1124 $(".form-pay").removeClass("show-me"); 1125 } 1126 $(".form-reg").toggleClass("show-me"); 1127 }); 1128 $(".btn-course .btn-pay").click(function (e) { 1129 e.preventDefault(); 1130 if ($(".form-reg").hasClass("show-me")) { 1131 $(".form-reg").removeClass("show-me"); 1132 } 1133 $(".form-pay").toggleClass("show-me"); 1134 }); 1135 1136 // Selectize 1137 $(".campaign-form form select").selectize({}); 1138 1139 $(".section-rsvp form select").selectize({}); 1140 1141 $(".form-two").hide(); 1142 1143 $(".btn-accept a").click(function (e) { 1144 e.preventDefault(); 1145 $(this).addClass("selected"); 1146 $(".btn-decline a").removeClass("selected"); 1147 $(".form-one").show(); 1148 $(".form-two").hide(); 1149 }); 1150 $(".btn-decline a").click(function (e) { 1151 $(this).addClass("selected"); 1152 $(".btn-accept a").removeClass("selected"); 1153 e.preventDefault(); 1154 $(".form-one").hide(); 1155 $(".form-two").show(); 1156 }); 1157 1158 // $(".page-template-template-campaign-landing .module-intro a").on("click", function (e) { 1159 // e.preventDefault(); 1160 // var link = $(this).data("t"); 1161 // scroll_to_el("#" + link); 1162 // }); 1163 1164 // $('.page-template-template-campaign-landing .module-intro a').click(function(e){ 1165 // e.preventDefault(); 1166 // var target = $($(this).attr('href')); 1167 // if(target.length){ 1168 // var scrollTo = target.offset().top; 1169 // $('body, html').animate({scrollTop: scrollTo+'px'}, 800); 1170 // } 1171 // }); 1172 1173 // ScrollMagic 1174 1175 var controller = new ScrollMagic.Controller({}); 1176 1177 new ScrollMagic.Scene({ triggerElement: "#block0", offset: 0 }) 1178 // trigger animation by adding a css class 1179 .setClassToggle(".timeline-wrapper #block0 .animate-this", "block-animate") 1180 // .addIndicators() // add indicators (requires plugin) 1181 .addTo(controller); 1182 new ScrollMagic.Scene({ triggerElement: "#block1", offset: 0 }) 1183 // trigger animation by adding a css class 1184 .setClassToggle(".timeline-wrapper #block1 .animate-this", "block-animate") 1185 // .addIndicators() // add indicators (requires plugin) 1186 .addTo(controller); 1187 new ScrollMagic.Scene({ triggerElement: "#block2", offset: 0 }) 1188 // trigger animation by adding a css class 1189 .setClassToggle(".timeline-wrapper #block2 .animate-this", "block-animate") 1190 // .addIndicators() // add indicators (requires plugin) 1191 .addTo(controller); 1192 new ScrollMagic.Scene({ triggerElement: "#block3", offset: 0 }) 1193 // trigger animation by adding a css class 1194 .setClassToggle(".timeline-wrapper #block3 .animate-this", "block-animate") 1195 // .addIndicators() // add indicators (requires plugin) 1196 .addTo(controller); 1197 new ScrollMagic.Scene({ triggerElement: "#block4", offset: 0 }) 1198 // trigger animation by adding a css class 1199 .setClassToggle(".timeline-wrapper #block4 .animate-this", "block-animate") 1200 // .addIndicators() // add indicators (requires plugin) 1201 .addTo(controller); 1202 new ScrollMagic.Scene({ triggerElement: "#block5", offset: 0 }) 1203 // trigger animation by adding a css class 1204 .setClassToggle(".timeline-wrapper #block5 .animate-this", "block-animate") 1205 // .addIndicators() // add indicators (requires plugin) 1206 .addTo(controller); 1207 new ScrollMagic.Scene({ triggerElement: "#block6", offset: 0 }) 1208 // trigger animation by adding a css class 1209 .setClassToggle(".timeline-wrapper #block6 .animate-this", "block-animate") 1210 // .addIndicators() // add indicators (requires plugin) 1211 .addTo(controller); 1212 new ScrollMagic.Scene({ triggerElement: "#block7", offset: 0 }) 1213 // trigger animation by adding a css class 1214 .setClassToggle(".timeline-wrapper #block7 .animate-this", "block-animate") 1215 // .addIndicators() // add indicators (requires plugin) 1216 .addTo(controller); 1217 new ScrollMagic.Scene({ triggerElement: "#block7", offset: 0 }) 1218 // trigger animation by adding a css class 1219 .setClassToggle(".timeline-wrapper #block7 .animate-this", "block-animate") 1220 // .addIndicators() // add indicators (requires plugin) 1221 .addTo(controller); 1222 new ScrollMagic.Scene({ triggerElement: "#block8", offset: 0 }) 1223 // trigger animation by adding a css class 1224 .setClassToggle(".timeline-wrapper #block8 .animate-this", "block-animate") 1225 // .addIndicators() // add indicators (requires plugin) 1226 .addTo(controller); 1227 new ScrollMagic.Scene({ triggerElement: "#block9", offset: 0 }) 1228 // trigger animation by adding a css class 1229 .setClassToggle(".timeline-wrapper #block9 .animate-this", "block-animate") 1230 // .addIndicators() // add indicators (requires plugin) 1231 .addTo(controller); 1232 new ScrollMagic.Scene({ triggerElement: "#block10", offset: 0 }) 1233 // trigger animation by adding a css class 1234 .setClassToggle(".timeline-wrapper #block10 .animate-this", "block-animate") 1235 // .addIndicators() // add indicators (requires plugin) 1236 .addTo(controller); 1237 new ScrollMagic.Scene({ triggerElement: "#block11", offset: 0 }) 1238 // trigger animation by adding a css class 1239 .setClassToggle(".timeline-wrapper #block11 .animate-this", "block-animate") 1240 // .addIndicators() // add indicators (requires plugin) 1241 .addTo(controller); 1242 new ScrollMagic.Scene({ triggerElement: "#block12", offset: 0 }) 1243 // trigger animation by adding a css class 1244 .setClassToggle(".timeline-wrapper #block12 .animate-this", "block-animate") 1245 // .addIndicators() // add indicators (requires plugin) 1246 .addTo(controller); 1247 new ScrollMagic.Scene({ triggerElement: "#block13", offset: 0 }) 1248 // trigger animation by adding a css class 1249 .setClassToggle(".timeline-wrapper #block13 .animate-this", "block-animate") 1250 // .addIndicators() // add indicators (requires plugin) 1251 .addTo(controller); 1252}); 1253/** 1254 * Moves the 'pdfprnt-buttons' div into the 'resource-detail-info__top-bar' div 1255 * but only on pages with '/resource/' in the URL path. 1256 */ 1257jQuery(window).on("load", function ($) { 1258 $ = jQuery; // Ensure jQuery is assigned properly 1259 1260 // Check if the current URL path contains '/resource/' 1261 if (window.location.pathname.includes('/resource/')) { 1262 // Select the div to move 1263 const printButtons = $('.pdfprnt-buttons.pdfprnt-buttons-resource.pdfprnt-bottom-left'); 1264 1265 // Select the destination container 1266 const topBar = $('.resource-detail-info__top-bar'); 1267 1268 // Move the print buttons to the last position inside topBar if both exist 1269 if (printButtons.length && topBar.length) { 1270 topBar.append(printButtons); 1271 } 1272 } 1273}); 1274 1275document.querySelectorAll('.img-wrapper img').forEach(img => { 1276 img.addEventListener('load', () => { 1277 img.parentElement.style.maxWidth = img.width + 'px'; 1278 }); 1279});
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.