diff --git a/mobile-integration/portlets/header/src/main/webapp/js/menu.js b/mobile-integration/portlets/header/src/main/webapp/js/menu.js index a7c2c2d92..cff86d626 100644 --- a/mobile-integration/portlets/header/src/main/webapp/js/menu.js +++ b/mobile-integration/portlets/header/src/main/webapp/js/menu.js @@ -7,14 +7,19 @@ $(".gtnResponsiveMenuCollapseButton").each(function(){ $(this).click(function(){ - if ($(this).data("target") && $(this).data("target-class") && $(this).data("action") == "toggleCSS") + var dataTarget = $(this).children(".data.target").first(); + var dataTargetClass = $(this).children(".data.target.class").first(); + var dataAction = $(this).children(".data.action").first(); + var dataSelfClass = $(this).children(".data.self.class").first(); + + if (dataTarget && dataTargetClass && dataAction.val() == "toggleCSS") { - $($(this).data("target")).toggleClass($(this).data("target-class")); + $(dataTarget.val()).toggleClass(dataTargetClass.val()); } - if ($(this).data("self-class") && $(this).data("action") == "toggleCSS") + if (dataSelfClass && dataAction.val() == "toggleCSS") { - $(this).toggleClass($(this).data("self-class")); + $(this).toggleClass(dataSelfClass.val()); } }); diff --git a/mobile-integration/portlets/header/src/main/webapp/jsp/header.jsp b/mobile-integration/portlets/header/src/main/webapp/jsp/header.jsp index 3ab3f7c0a..11466ab77 100644 --- a/mobile-integration/portlets/header/src/main/webapp/jsp/header.jsp +++ b/mobile-integration/portlets/header/src/main/webapp/jsp/header.jsp @@ -41,9 +41,12 @@ jsMan.require("SHARED/org_gatein_responsive_menu", "menu").addScripts("menu.init