1jQuery(document).ready(function (jQuery) { 2 'use strict'; 3 4 /* add back button to sub-menus */ 5 jQuery('.taptap-by-bonfire-horizontal .sub-menu').prepend('<a class="taptap-horizontal-close-submenu" href="#"></a>'); 6 /* add arrow to sub-menu back button */ 7 jQuery('.taptap-by-bonfire-horizontal .menu-item-has-children > a').prepend('<span class="taptap-horizontal-sub-arrow"></span>'); 8 /* add line after menu items with .taptap-title class */ 9 jQuery('<div class="taptap-title-line"></div>').appendTo('.taptap-by-bonfire-horizontal .taptap-title'); 10 11 /* show horizontal sub-menu */ 12 jQuery('.taptap-by-bonfire-horizontal .menu-item-has-children > a').on('click', function(e) { 13 e.preventDefault(); 14 15 jQuery(this).siblings().show(0).addClass('is-active'); 16 jQuery(this).parent().parent().find('> li > a, > li > .taptap-title-line, > .taptap-horizontal-close-submenu').addClass('is-active-top').delay(500).hide(0); 17 }); 18 /* move horizontal menu right */ 19 jQuery('.menu-item-has-children > a').on('click', function() { 20 var val = (parseInt(document.getElementById('taptap-move-horiz').style.left, 0) || 0) - 320; 21 document.getElementById('taptap-move-horiz').style.left = val + 'px'; 22 }); 23 24 /* hide horizontal sub-menu */ 25 jQuery('.taptap-horizontal-close-submenu').on('click', function(e) { 26 e.preventDefault(); 27 28 jQuery(this).parent().removeClass('is-active').delay(500).hide(0); 29 jQuery(this).parent().parent().parent().find('> li > a, > li > .taptap-title-line, > .taptap-horizontal-close-submenu').show().removeClass('is-active-top'); 30 }); 31 /* move horizontal menu left */ 32 jQuery('.taptap-horizontal-close-submenu').on('click', function() { 33 var val = (parseInt(document.getElementById('taptap-move-horiz').style.left, 0) || 0) + 320; 34 document.getElementById('taptap-move-horiz').style.left = val + 'px'; 35 }); 36 37 /* clone top-level link and turn into back button */ 38 jQuery('.taptap-by-bonfire-horizontal .menu-item-has-children > a').each(function() { 39 jQuery(this).clone().addClass('taptap-horizontal-back').prependTo(jQuery(this).next().children(':first')); 40 }); 41 42 /* ignore links on menu items that have .taptap-title class */ 43 jQuery('.taptap-by-bonfire-horizontal .taptap-title a').on('click', function(e) { 44 e.preventDefault(); 45 }); 46 47});
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.