Difference between revisions of "Template:Example2"

Line 43: Line 43:
 
// select a page from the menu based on the id assigned to it and the current page name and add the class "current page" to make it change background color
 
// select a page from the menu based on the id assigned to it and the current page name and add the class "current page" to make it change background color
 
$("#"+  wgPageName.substring(wgPageName.indexOf("/")+1, wgPageName.length ) + "_page").addClass("current_page");
 
$("#"+  wgPageName.substring(wgPageName.indexOf("/")+1, wgPageName.length ) + "_page").addClass("current_page");
 
+
console.log((wgPageName.substring(wgPageName.indexOf("/")+1, wgPageName.length ) + "_page"));
 
// now that the current_page class has been added to a menu item, make the submenu fade in
 
// now that the current_page class has been added to a menu item, make the submenu fade in
 
$(".current_page").parents(".submenu_wrapper").fadeIn(400);
 
$(".current_page").parents(".submenu_wrapper").fadeIn(400);

Revision as of 21:22, 22 March 2017