1
0

Only fire smallscreen nav script if there is a nav.

This commit is contained in:
Matthias Mees
2013-07-06 13:32:45 +02:00
parent 43a2225778
commit 175e73202a

View File

@ -1045,20 +1045,24 @@ var AccessifyHTML5 = function (defaults, more_fixes) {
(function($) { (function($) {
// Fire responsive nav // Fire responsive nav
var navigation = responsiveNav('#main_menu', { var $hasMenu = $('body').has('#main_menu');
animate: true, // Boolean: Use CSS3 transitions, true or false
transition: 250, // Integer: Speed of the transition, in milliseconds if($hasMenu.size() > 0) {
// String: Label for the navigation toggle var navigation = responsiveNav('#main_menu', {
label: "", animate: true, // Boolean: Use CSS3 transitions, true or false
insert: "before", // String: Insert the toggle before or after the navigation transition: 250, // Integer: Speed of the transition, in milliseconds
customToggle: "nav-toggle", // Selector: Specify the ID of a custom toggle // String: Label for the navigation toggle
openPos: "relative", // String: Position of the opened nav, relative or static label: "",
jsClass: "js", // String: 'JS enabled' class which is added to <html> el insert: "before", // String: Insert the toggle before or after the navigation
debug: false, // Boolean: Log debug messages to console, true or false customToggle: "nav-toggle", // Selector: Specify the ID of a custom toggle
init: function() { } , // Function: Init callback openPos: "relative", // String: Position of the opened nav, relative or static
open: function() { } , // Function: Open callback jsClass: "js", // String: 'JS enabled' class which is added to <html> el
close: function() { } // Function: Close callback debug: false, // Boolean: Log debug messages to console, true or false
}); init: function() { } , // Function: Init callback
open: function() { } , // Function: Open callback
close: function() { } // Function: Close callback
});
}
// Fire WYSIWYG editor(s) // Fire WYSIWYG editor(s)
serendipity.spawn(); serendipity.spawn();