I am facing an issue with responsive navigation not working properly in IE8. The navigation disappears when the window is resized, and I want to prevent this from happening. In my HTML code, I have assigned a class of "lt-ie9" for IE8 compatibility. Could you provide guidance on adjusting the code so that if the browser window size is below 767 pixels, it will use the desktop version of the navigation?
function resizeNav() {
if (!nav) {
nav = {};
nav.root = jQuery('#navigation');
nav.primary = nav.root.find('.menu');
nav.secondary = jQuery('.secondary-links');
nav.moveable = nav.secondary.children('li');
nav.icon = jQuery('<div id="menu-icon" class="btn">Navigation</div>');
nav.icon.click(function () {
nav.primary.slideToggle('slow');
nav.icon.toggleClass('active');
});
}
// Arrange elements based on window size
if (getWidth() <= 767) {
nav.moveable.appendTo(nav.primary);
nav.root.prepend(nav.icon);
nav.primary.hide();
} else {
nav.moveable.appendTo(nav.secondary);
nav.icon.detach();
nav.primary.show();
}
nav.icon.removeClass('active');
}