Difference between revisions of "Dynamic Navigation"

From Organic Design
(To make the first open by default)
(Fixing)
Line 1: Line 1:
 
== Show/Hide Boxes ==
 
== Show/Hide Boxes ==
This method is from [[News:Main Page|Wiki News front page]], which are maintained by Wikipedia users [[w:User:Mike Dillon|Mike Dillon]], [[w:User:R. Koot|R. Koot]] and [[w:User:SG|SG]]. The main page covering this is [[Wikipedia:NavFrame]] (I think). It involves three parts, CSS styles, JavaScript code and a template, which follow here:
+
This method is from [[News:Main Page|Wiki News front page]], which are maintained by Wikipedia users [[w:User:Mike Dillon|Mike Dillon]], [[w:User:R. Koot|R. Koot]] and [[w:User:SG|SG]]. The main page covering this is [[wikipedia:Wikipedia:NavFrame|Wikipedia:NavFrame]] (I think). It involves three parts, CSS styles, JavaScript code and a template, which follow here:
  
 
{{Dynamic navigation
 
{{Dynamic navigation

Revision as of 14:36, 27 April 2009

Show/Hide Boxes

This method is from [Page|Wiki News front page], which are maintained by Wikipedia users Mike Dillon, R. Koot and SG. The main page covering this is Wikipedia:NavFrame (I think). It involves three parts, CSS styles, JavaScript code and a template, which follow here:




To make the first open by default

At the end of the last function (called createNavigationBarToggleButton) there are two loops which close all the navbars. The first loops closes the separate navs and the second closes the grouped ones (that can have only one open at a time). To make either kind default to having their first navbar open, start the loop at 2 instead of 1.