MCPcopy Create free account
hub / github.com/Simsys/qhexedit2 / resetState

Function resetState

doc/html/menu.js:110–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

108 });
109 // set default menu visibility
110 function resetState() {
111 var $menu = $('#main-menu');
112 var $mainMenuState = $('#main-menu-state');
113 var newWidth = $(window).outerWidth();
114 if (newWidth!=prevWidth) {
115 if ($(window).outerWidth()<768) {
116 $mainMenuState.prop('checked',false); $menu.hide();
117 $('#searchBoxPos1').html(searchBoxHtml);
118 $('#searchBoxPos2').hide();
119 } else {
120 $menu.show();
121 $('#searchBoxPos1').empty();
122 $('#searchBoxPos2').html(searchBoxHtml);
123 $('#searchBoxPos2').show();
124 }
125 if (typeof searchBox!=='undefined') {
126 searchBox.CloseResultsWindow();
127 }
128 prevWidth = newWidth;
129 }
130 }
131 $(window).ready(function() { resetState(); initResizableIfExists(); });
132 $(window).resize(resetState);
133 }

Callers 1

initMenuFunction · 0.85

Calls 1

$Function · 0.85

Tested by

no test coverage detected