1/** 2 * @file 3 * A JavaScript file containing the main menu functionality (small/large screen) 4 * 5 */ 6 7(function ($, Drupal) { 8 Drupal.behaviors.quickSearchDropdown = { 9 attach: function (context) { 10 const $dropdownToggle = $('#quick-search-dropdown', context); 11 12 $dropdownToggle.on('click tap', function() { 13 let expanded = this.getAttribute('aria-expanded') === 'true' || false; 14 this.setAttribute('aria-expanded', !expanded); 15 16 let $dropdown = $(this).parent('.dropdown'); 17 $dropdown.toggleClass('open'); 18 }); 19 20 // close when user clicks elsewhere. 21 $(document).on('click touch touchend', function(e) { 22 let target = e.target 23 24 // if clicked outside quick search 25 if (($(target).parents('.dropdown-quick-search').length === 0)) { 26 $('.dropdown-quick-search').removeClass('open'); 27 $('#quick-search-dropdown').attr('aria-expanded', false); 28 } 29 }); 30 } 31 } 32 })(jQuery, Drupal);
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.