Team:Carnegie Mellon/FAQ

From 2012.igem.org

(Difference between revisions)
Line 26: Line 26:
 +
<html>
 +
<!-- Testing TOC -->
 +
$('#toc').toc({
 +
    'selectors': 'h1,h2,h3', //elements to use as headings
 +
    'container': 'body', //element to find all selectors in
 +
    'smoothScrolling': true, //enable or disable smooth scrolling on click
 +
    'prefix': 'toc', //prefix for anchor tags and class names
 +
    'onHighlight': function(el) {}, //called when a new section is highlighted
 +
    'highlightOnScroll': true, //add class to heading that is currently in focus
 +
    'highlightOffset': 100, //offset to trigger the next headline
 +
    'anchorName': function(i, heading, prefix) { //custom function for anchor name
 +
        return prefix+i;
 +
    },
 +
    'headerText': function(i, heading, $heading) { //custom function building the header-item text
 +
        return $heading.text();
 +
    }
 +
});
 +
 +
</html>
{{:Team:Carnegie_Mellon/Templates/Footer}}
{{:Team:Carnegie_Mellon/Templates/Footer}}

Revision as of 19:08, 26 July 2012

Image:CMU_image6.jpeg

FAQ

Question 1. Style sheet?

here

Question 2. Header/Footer?

Header Footer

Question 3. Markup?

here

Question 4. General Helpful References

Look at our page's source to see the different div-id's used. Go through the stylesheet to see how each element is formatted and the end result.

CSS Zen Garden - Great site on styling with very nice examples

Jquery Tools - Toolbox of common JS uses, very thorough demos

Misc Jquery - Links to other popular Jquery based tools


$('#toc').toc({ 'selectors': 'h1,h2,h3', //elements to use as headings 'container': 'body', //element to find all selectors in 'smoothScrolling': true, //enable or disable smooth scrolling on click 'prefix': 'toc', //prefix for anchor tags and class names 'onHighlight': function(el) {}, //called when a new section is highlighted 'highlightOnScroll': true, //add class to heading that is currently in focus 'highlightOffset': 100, //offset to trigger the next headline 'anchorName': function(i, heading, prefix) { //custom function for anchor name return prefix+i; }, 'headerText': function(i, heading, $heading) { //custom function building the header-item text return $heading.text(); } });


Image:TartanFooter.jpeg

Retrieved from "http://2012.igem.org/Team:Carnegie_Mellon/FAQ"