June 25, 2007

The all time greatest hits of the beloved twelve-tone masters

Arnold_Schoenberg_la_1948.jpg

"As seen on TV!"

A very effective infomercial! I wanted to order a dozen, for all my classical-music-loving friends!





alt : Presenting Arnie Schoenberg and his Second Viennese School!

Almost as funny as this one!

Posted by ellen at 6:33 PM

June 9, 2007

Javascript toggle function

One of the most frequently used constructions in javascript are functions that toggle styles or properties on and off. This can be used for items that require a highlighting effect, or to create layers that expand or contract, or any other property change where you want a property of an element to toggle on and off depending on its current state.

Put this in the head of the document:
 <script>function toggle(id){ 
  var element = document.getElementById(id); 
  element.style.display = (element.style.display == 'block') ? "none" : "block"; 
  } 
 </script> 

Create the trigger for the toggle:
<a href="javascript: toggle('myElement');">Open/Close</a>

Create the element you want to toggle open and closed:
<div id="myElement" style="display:block"> content goes here </div>

Posted by ellen at 10:56 AM