1$(document).ready(function() { 2 3 var carlsbergNavMobile = (function() { 4 5 // 'Private' 6 function init(){ 7 bindInitMmenu(); 8 bindCloseMmenu(); 9 bindSearchSubmit(); 10 } 11 12 function bindInitMmenu(){ 13 14 var rtl = $('html').attr('dir') == "rtl"; 15 16 $('.nav-mobile').mmenu({ 17 rtl: { 18 use: rtl 19 }, 20 extensions: ['pagedim-black'], 21 offCanvas: { 22 position: rtl ? 'left' : 'right' 23 } 24 }); 25 } 26 27 function bindCloseMmenu(){ 28 var API = $('.nav-mobile').data('mmenu'); 29 $('.mobile-menu-button').on('click', function() { 30 if($('html').hasClass('mm-opened')){ 31 API.close(); 32 } 33 }); 34 } 35 36 function bindSearchSubmit(){ 37 $('.nav-mobile__search-submit').on('click', function(){ 38 $(this).closest('form').submit(); 39 }); 40 } 41 42 // 'Public' 43 return { 44 init: init 45 }; 46 47 })(); 48 49 carlsbergNavMobile.init(); 50});
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.