Team:Groningen/menu.html

From 2011.igem.org

(Difference between revisions)
 
(20 intermediate revisions not shown)
Line 1: Line 1:
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml2/DTD/xhtml1-strict.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
Line 6: Line 5:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
-
<script type="text/javascript" src="ddaccordion.js">
+
<script type="text/javascript" src="http://www.dynamicdrive.com/dynamicindex17/ddaccordion.js">
/***********************************************
/***********************************************
Line 22: Line 21:
ddaccordion.init({
ddaccordion.init({
headerclass: "submenuheader", //Shared CSS class name of headers group
headerclass: "submenuheader", //Shared CSS class name of headers group
-
contentclass: "submenu", //Shared CSS class name of contents group
+
contentclass: "submenu",     //Shared CSS class name of contents group
-
revealtype: "click", //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
+
revealtype: "click",         //Reveal content when user clicks or onmouseover the header? Valid value: "click", "clickgo", or "mouseover"
-
mouseoverdelay: 200, //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
+
mouseoverdelay: 200,         //if revealtype="mouseover", set delay in milliseconds before header expands onMouseover
-
collapseprev: true, //Collapse previous content (so only one open at any time)? true/false  
+
collapseprev: true,           //Collapse previous content (so only one open at any time)? true/false  
-
defaultexpanded: [], //index of content(s) open by default [index1, index2, etc] [] denotes no content
+
defaultexpanded: [],         //index of content(s) open by default [index1, index2, etc] [] denotes no content
-
onemustopen: false, //Specify whether at least one header should be open always (so never all headers closed)
+
onemustopen: false,           //Specify whether at least one header should be open always (so never all headers closed)
-
animatedefault: false, //Should contents open by default be animated into view?
+
animatedefault: false,       //Should contents open by default be animated into view?
-
persiststate: true, //persist state of opened contents within browser session?
+
persiststate: true,           //persist state of opened contents within browser session?
-
toggleclass: ["", ""], //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
+
toggleclass: ["", ""],       //Two CSS classes to be applied to the header when it's collapsed and expanded, respectively ["class1", "class2"]
togglehtml: ["suffix", "<img src='plus.gif' class='statusicon' />", "<img src='minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
togglehtml: ["suffix", "<img src='plus.gif' class='statusicon' />", "<img src='minus.gif' class='statusicon' />"], //Additional HTML added to the header when it's collapsed and expanded, respectively  ["position", "html1", "html2"] (see docs)
-
animatespeed: "fast", //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
+
animatespeed: "fast",         //speed of animation: integer in milliseconds (ie: 200), or keywords "fast", "normal", or "slow"
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
oninit:function(headers, expandedindices){ //custom code to run when headers have initalized
//do nothing
//do nothing
Line 154: Line 153:
</p>
</p>
 +
<p>Helpful links: </p>
 +
<p>
 +
- <a href="http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment.htm">Adding arbitrary links hat expand/ collapse the contents</a><br />
 +
- <a href="http://www.dynamicdrive.com/dynamicindex17/ddaccordion_suppliment2.htm">Taking advantage of the oninit() and onopenclose() event handlers</a><br />
 +
</p>
</body>
</body>
</html>
</html>

Latest revision as of 09:40, 19 August 2011

Assuming the current page is named "current.htm", the below links when navigated to expands a particular header on that page:

- Expand 1st header within "submenuheader" header group

Helpful links:

- Adding arbitrary links hat expand/ collapse the contents
- Taking advantage of the oninit() and onopenclose() event handlers