! function($) { "use strict"; $(document).ready(function() { var $btn = $('.btn-navbar'), $nav = null, $logo = '', $fixeditems = null; if (!$btn.length) { return; } $nav = $('
').appendTo($(' ').appendTo(document.body)); $($btn.data('target')).clone().appendTo($nav); $('.noo-sidebar-wrap').clone().appendTo('.noo-main-canvas'); $('.noo_icon_menu').click(function() { if ($('body').hasClass('noo-open-canvas')) { hideMenu(); } else { showMenu(); } }); function showMenu() { $('body').addClass('noo-open-canvas'); setTimeout(function() { $('body').addClass('noo-canvas-enabled'); $('#off-canvas-nav').bind('click', function(e) { e.stopPropagation(); }); $('html').bind('click', bdHideNav); $('.remove-menumobile').bind('click', bdHideNav); }, 50); } function bdHideNav(e) { e.preventDefault(); hideMenu(); return false; } function hideMenu() { $('#off-canvas-nav').unbind('click'); $('html').unbind('click', bdHideNav); $('body').removeClass('noo-canvas-enabled'); setTimeout(function() { $('body').removeClass('noo-open-canvas'); }, 600); } }) }(jQuery);