Difference between revisions of "Template:2016Demo bottom"

Line 8: Line 8:
  
  
var getPageName; // STORE THE URL
 
var pageName;      // URL IN STRING FORM
 
 
var currentMenu; // STRING HOLDS WHAT PAGE NAMESPACE YOU ARE IN  
 
var currentMenu; // STRING HOLDS WHAT PAGE NAMESPACE YOU ARE IN  
 
var whichMenu; // STRING USED TO LOAD A SUBMENU
 
var whichMenu; // STRING USED TO LOAD A SUBMENU
Line 30: Line 28:
  
 
$(document).ready(function() {
 
$(document).ready(function() {
getPageName= window.location; //GETS URL
 
pageName=getPageName.toString(); // TRANSFORMS URL TO A STRING
 
 
  
 
+
if ( wgPageName.indexOf( hub_list[0] ) > -1 ) {
if ( pageName.indexOf( hub_list[0] ) > -1 ) {
+
 
showMainMenu();
 
showMainMenu();
 
menu_found= true;
 
menu_found= true;
Line 42: Line 36:
 
for ( var i=1; i< hub_list.length; i++ ) {
 
for ( var i=1; i< hub_list.length; i++ ) {
  
if ( pageName.indexOf( hub_list[i] ) > -1 ){
+
if ( wgPageName.indexOf( hub_list[i] ) > -1 ){
 
whichPageMenu( hub_list[i] );
 
whichPageMenu( hub_list[i] );
 
menu_found= true;
 
menu_found= true;

Revision as of 19:57, 23 November 2015