1(function ($) { 2 3 window.site = { 4 5 init: function () { 6 window.site.move_hero_header.init(); 7 window.site.load_more_button(); 8 window.site.footer.init(); 9 window.site.inputs(); 10 11 const players = Array.from(document.querySelectorAll('.fluid-width-video-wrapper')).map((p) => new Plyr(p)); 12 }, 13 14 //---------------------------------------------------------------------------------- 15 // Load more button 16 //---------------------------------------------------------------------------------- 17 18 load_more_button: function () { 19 20 var $content_module = $(".subsection-press_release .content_module p, .page-param-type-viewing_room_id .panel_type_2 .description p"); 21 22 if ($content_module.length >= 4) { 23 var $load_more_btn = $("<div class='link load_more'>Load More</div>").appendTo('.subsection-press_release, .page-param-type-viewing_room_id .panel_type_2 .description').show(); 24 25 $content_module.addClass("hidden").filter(':lt(3)').removeClass("hidden"); 26 27 $('.subsection-press_release, .page-param-type-viewing_room_id .panel_type_2 .description').on('click', '.link', function () { 28 $content_module.removeClass('hidden').addClass('show'); 29 $load_more_btn.hide(); 30 }); 31 } 32 33 }, 34 35 //---------------------------------------------------------------------------------- 36 // Hero Header 37 //---------------------------------------------------------------------------------- 38 39 move_hero_header: { 40 init: function () { 41 42 var pageNews = $(".page-news.page-param-type-news_id"); 43 if (pageNews.length) { 44 var heroHeader = pageNews.find("#hero_header"), 45 h2 = heroHeader.find("h2"), 46 dateElement = pageNews.find(".date"); 47 48 h2.insertBefore(heroHeader); 49 50 dateElement.prependTo(h2); 51 } 52 } 53 }, 54 55 //---------------------------------------------------------------------------------- 56 // Footer 57 //---------------------------------------------------------------------------------- 58 59 footer: { 60 init: function () { 61 62 const $footer = $("#footer"); 63 if ($footer.length) { 64 $("#mailinglist").insertBefore(".small-links-container"); 65 $(".advanced_footer_item").wrapAll("<div class='advanced_footer_items'></div>"); 66 $(".copyright, #social_links").wrapAll("<div class='small-footer-links'></div>"); 67 $(".copyright-text").insertBefore("#social_links"); 68 } 69 } 70 }, 71 72 //---------------------------------------------------------------------------------- 73 // Form inputs 74 //---------------------------------------------------------------------------------- 75 76 inputs: () => { 77 const $formRows = $('#contact_form .form_row, #artlogic_mailinglist_signup_form .form_row'); 78 79 $formRows.each(function () { 80 const $inputField = $(this).find('.inputField, .protected_path_field, textarea'); 81 const $label = $(this).find('label'); 82 83 $inputField.attr('placeholder', $label.text()); 84 85 $inputField.on('input', function () { 86 $(this).closest('.form_row').toggleClass('form_row--not-empty', $(this).val().trim() !== ''); 87 }); 88 }); 89 90 // Handling the message field separately 91 // const $messageField = $('#f_message'); 92 93 // $messageField.on('input', function () { 94 // $(this).closest('.form_row').toggleClass('form_row--not-empty', $(this).val().trim() !== ''); 95 // }); 96 }, 97 }; 98 99 100 $(document).ready(function () { 101 102 window.site.init(); 103 104 }); 105 106})(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.