On the normal empty-page.xhtml the mobile-menu is working like it should. But on the promotion-page.xhtml the PopUp menu doesn't appear.
When i inspect the page, there isn't any Event-Listener attached to the <a> element of the menu-button.
Am i the only one with this Problem or is it a known issue?
PopUp-Menu of Promotion Page doesn't appear
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Thanks for the issue! I'll fix it for next release. You can use the following changes for now;
in promotion-page.xhtml
- please create promotionpage.js in webapp/resources/venture-layout/js/;
in promotion-page.xhtml
Code: Select all
<h:head>
....
<h:outputScript name="js/nanoscroller.js" library="venture-layout" />
<h:outputScript name="js/promotionpage.js" library="venture-layout" /> <!-- instead of layout.js -->
</h:head>
Code: Select all
$(document).ready(function() {
var menuWrapper = $('#layout-menu-cover'),
menuScrollContent = $('#layout-menu-cover-scroll-content'),
menu = $('#layout-menu'),
menuPopupButton = $('#mobile-menu-btn'),
layoutMenuClick = false;
menuWrapper.addClass('nano');
menuScrollContent.addClass('nano-content');
$(".nano").nanoScroller();
setTimeout(function(){menuWrapper.addClass("Animated03");},500);
// show and hide popup main menu when click a menu button
menuPopupButton.off('click.popupMenubutton').on('click.popupMenubutton', function(e){
layoutMenuClick = true;
if(menuWrapper.hasClass('active')) {
$(this).removeClass('active');
menuWrapper.removeClass('active');
}
else {
$(this).addClass('active');
menuWrapper.addClass('active');
}
e.preventDefault();
});
menuWrapper.on('click', function() {
layoutMenuClick = true;
});
this.clickNS = 'click.' + this.id;
$(document.body).off(this.clickNS).on(this.clickNS, function (e) {
if(!layoutMenuClick) {
var activeMenuParent = menu.children('li.active-menu-parent');
menuWrapper.removeClass('active');
activeMenuParent.children('a').removeClass('active-menu');
activeMenuParent.removeClass('active-menu-parent').children('ul').removeClass('active-menu');
menuPopupButton.removeClass('active');
}
layoutMenuClick = false;
});
});
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
You're welcome!
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 1 guest