Note: Some of the example code shown below is not the full code being executed. To make things as simple as possible I wanted to just show the critical code pertaining to style manipulation, thus the code that deals with browser differences is not shown. To see the full code one can view the source code.
This example demonstrates how to access the properties of the style sheets.
This text is not shown if style sheet is on
This text should be larger
This text should be green
<style id="disable_example"> .hidden { display: none; } .bigger { font-size: 150%; } .green { color: green; } </style>
function disableSheet() { document.getElementById('disable_example').disabled=true; } function enableSheet() { document.getElementById('disable_example').disabled=false; }