Return to Snippet

Revision: 1050
at September 4, 2006 17:39 by Corhol


Initial Code
// setStyleSheet() by Paul Sowdon
// http://www.alistapart.com/articles/alternate/
function setStyleSheet ( title ) {
    var i, a, main;
    for ( i = 0; ( a = document.getElementsByTagName("link")[i] ); i++ ) {
        if ( a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title") ) {
        a.disabled = true;
        if ( a.getAttribute("title") == title ) a.disaled = false;
        }
    }
}

Initial URL

                                

Initial Description

                                

Initial Title
setStyleSheet() by Paul Sowdon

Initial Tags
javascript, style

Initial Language
JavaScript