Difference between revisions of "Template:Example"

Line 468: Line 468:
 
 
  
// this adds the team's name as an h1
+
if ( wgPageName.indexOf("Template") ) {
$("#team_name").html( wgPageName.substring( 5 , wgPageName.indexOf("/")  ) );  
+
$("#team_name").html( wgPageName );  
 +
}
  
// this adds the page's title as an h4
+
else {
$("#page_name").html (    ( wgPageName.substring( wgPageName.indexOf("/") + 1, wgPageName.length ) ).replace( /\//g , " ")  );
+
// this adds the team's name as an h1
 +
$("#team_name").html( wgPageName.substring( 5 , wgPageName.indexOf("/") ) );  
  
 +
// this adds the page's title as an h4
 +
$("#page_name").html (    ( wgPageName.substring( wgPageName.indexOf("/") + 1, wgPageName.length ) ).replace( /\//g , " ")  );
 +
}
  
 
$('#accordion').find('.menu_item').click(function(){
 
$('#accordion').find('.menu_item').click(function(){

Revision as of 18:46, 13 April 2016