1/** 2 * @file 3 * Adds the active class to active links, for proper top bar rendering. 4 * 5 */ 6(function ($, Drupal) { 7 /** 8 * Adds the "active" class to top bar <li> elements with active child links. 9 */ 10 Drupal.behaviors.foundationTopBarActive = { 11 attach: function (context, settings) { 12 var $active_links = $(context).find('.top-bar .menu-item > a.is-active'); 13 if ($active_links.length) { 14 $(once('foundationTopBarActive', $active_links)).each(function() { 15 $(this).parent().addClass('active'); 16 }); 17 } 18 } 19 }; 20 21})(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.