Difference between revisions of "Rename tab in Elections Stats Dashboard"

From UnionCloud Support
Jump to: navigation, search
 
Line 2: Line 2:
  
 
To rename the Halls tab to Schools for example use the code below;
 
To rename the Halls tab to Schools for example use the code below;
 
+
<syntaxhighlight lang="javascript" line='line'>
 
     // Fix for changing 'halls' to 'schools'
 
     // Fix for changing 'halls' to 'schools'
 
     $(function(){   
 
     $(function(){   
Line 13: Line 13:
 
       }
 
       }
 
     })
 
     })
 +
</syntaxhighlight>

Latest revision as of 15:10, 29 March 2017

If you want to change the Name of one of the tabs on the Election Stats Dashboard, and you have access to Global Javascript you can do this using the following lines of code]]

To rename the Halls tab to Schools for example use the code below;

 1     // Fix for changing 'halls' to 'schools'
 2     $(function(){   
 3         if($(".uc-election-dashboard").length > 0){
 4           $(".hall a").text("Schools");
 5      
 6           if($(".hall.active").length > 0){ 
 7             $(".uc-top-turnouts-headings").text("Schools");
 8           }
 9        }
10     })