This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
lnapp/media/theme/focusbusiness/js/focus.js

33 lines
753 B
JavaScript
Raw Normal View History

2013-04-25 00:22:36 +00:00
$(function () {
responsiveNav ();
});
function responsiveNav () {
var html = '';
var cloned = $('#main-nav > li').clone ();
var container = $('<div>', { id: 'responsive-nav' });
var items = $('<ul>', { id: 'responsive-nav-items' });
var trigger = $('<div>', { id: 'responsive-nav-trigger', text: 'Navigate...' });
container.appendTo ('#nav .container');
items.appendTo (container);
items.append (cloned);
items.find ('li').removeClass ('dropdown');
items.find ('ul').removeClass ('dropdown-menu');
items.find ('.caret').remove ();
items.append (html);
trigger.bind ('click', function (e) {
items.slideToggle ();
trigger.toggleClass ('open');
});;
trigger.prependTo (container);
}