Dieser Teil ist auf jeden Fall schon mal falsch gewrapped:
PHP-Code:
<script type="text/javascript">
// ml-menu init
(function() {
var menuEl = document.getElementById('ml-menu'),
mlmenu = new MLMenu(menuEl, {
breadcrumbsCtrl : true, // show breadcrumbs
initialBreadcrumb : 'home', // initial breadcrumb text
backCtrl : true, // show back button
itemsDelayInterval : 0, // delay between each menu item sliding animation
// onItemClick: loadDummyData // callback: item that doesn´t have a submenu gets clicked - onItemClick([event], [inner HTML of the clicked item])
});
// mobile menu toggle
var openMenuCtrl = document.querySelector('.action--open'),
closeMenuCtrl = document.querySelector('.action--close');
$('.action--open').bind('click', openMenu);
$('.action--close').bind('click', closeMenu);
function openMenu() {
classie.add(menuEl, 'menu--open');
// toggle Icon
$('#nav-toggle').find('i').toggleClass('fa-navicon').toggleClass('fa-close');
// toggle Event-Listener
$('#nav-toggle').unbind('click', openMenu);
$('#nav-toggle').bind('click', closeMenu);
}
function closeMenu() {
classie.remove(menuEl, 'menu--open');
// toggle Icon
$('#nav-toggle').find('i').toggleClass('fa-navicon').toggleClass('fa-close');
// toggle Event-Listener
$('#nav-toggle').unbind('click', closeMenu);
$('#nav-toggle').bind('click', openMenu);
}
})();
$('#quick-toggle').click(function(){
$(this).find('i').toggleClass('fa-plus').toggleClass('fa-minus');
});
</script>
Sollte eher so aussehen:
PHP-Code:
<script>
// ml-menu init
(function($) {
var menuEl = document.getElementById('ml-menu'),
mlmenu = new MLMenu(menuEl, {
breadcrumbsCtrl : true, // show breadcrumbs
initialBreadcrumb : 'home', // initial breadcrumb text
backCtrl : true, // show back button
itemsDelayInterval : 0, // delay between each menu item sliding animation
// onItemClick: loadDummyData // callback: item that doesn´t have a submenu gets clicked - onItemClick([event], [inner HTML of the clicked item])
});
// mobile menu toggle
var openMenuCtrl = document.querySelector('.action--open'),
closeMenuCtrl = document.querySelector('.action--close');
$('.action--open').bind('click', openMenu);
$('.action--close').bind('click', closeMenu);
function openMenu() {
classie.add(menuEl, 'menu--open');
// toggle Icon
$('#nav-toggle').find('i').toggleClass('fa-navicon').toggleClass('fa-close');
// toggle Event-Listener
$('#nav-toggle').unbind('click', openMenu);
$('#nav-toggle').bind('click', closeMenu);
}
function closeMenu() {
classie.remove(menuEl, 'menu--open');
// toggle Icon
$('#nav-toggle').find('i').toggleClass('fa-navicon').toggleClass('fa-close');
// toggle Event-Listener
$('#nav-toggle').unbind('click', closeMenu);
$('#nav-toggle').bind('click', openMenu);
}
$('#quick-toggle').click(function(){
$(this).find('i').toggleClass('fa-plus').toggleClass('fa-minus');
});
})(jQuery);
</script>
Woher genau kommt das?
Kann aber nicht sagen, ob das die Probleme verursacht.