{"id":537,"date":"2003-03-30T12:00:21","date_gmt":"2003-03-30T20:00:21","guid":{"rendered":"http:\/\/lee.org\/blog\/archives\/2003\/03\/30\/3-30-03\/"},"modified":"2006-04-03T23:52:08","modified_gmt":"2006-04-04T07:52:08","slug":"itty-bitty-javascript-css-randomizer","status":"publish","type":"post","link":"https:\/\/www.lee.org\/blog\/2003\/03\/30\/itty-bitty-javascript-css-randomizer\/","title":{"rendered":"itty bitty Javascript CSS randomizer"},"content":{"rendered":"<p>Although I don&#8217;t know <a href=\"http:\/\/tnt.dynodns.net\/~maruah\">Maruah<\/a>, I have to thank him\/her for the itty bitty Javascript CSS randomizer in my Journal. There&#8217;s nothing to it! Reload this page to understand what I&#8217;m talking about.<\/p>\n<p><code>&lt;script language=\"javascript\"><br \/>\n&lt;!--<br \/>\nvar WhatCSS=Math.round(Math.random()*1);<br \/>\nvar TheCSS=new Array(2);<br \/>\nTheCSS[0]=\"journal.css\";<br \/>\nTheCSS[1]=\"journal2.css\";<br \/>\ndocument.write('&lt;link rel=\"stylesheet\" type=\"text\/css\" href=\"' + TheCSS[WhatCSS] + '\">') ;<br \/>\n--><br \/>\n&lt;\/script><br \/>\n<\/code><\/p>\n<p>And thank you to <a href=\"http:\/\/www.brownpau.com\/\">BrownPau<\/a> for the CSS toggler&#8230; who got it from <a href=\"http:\/\/www.alistapart.com\/stories\/alternate\/\">A List Apart<\/a>.<\/p>\n<p>I finished reading In Code but I&#8217;ll likely be re-reading it for a while to get all the number-theory goodness I can out of it. I&#8217;ve started playing piano&#8230; well, sort of. It&#8217;ll be a while before I&#8217;m a virtuoso.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Although I don&#8217;t know Maruah, I have to thank him\/her for the itty bitty Javascript CSS randomizer in my Journal. There&#8217;s nothing to it! Reload this page to understand what I&#8217;m talking about. &lt;script language=&#8221;javascript&#8221;> &lt;!&#8211; var WhatCSS=Math.round(Math.random()*1); var TheCSS=new Array(2); TheCSS[0]=&#8221;journal.css&#8221;; TheCSS[1]=&#8221;journal2.css&#8221;; document.write(&#8216;&lt;link rel=&#8221;stylesheet&#8221; type=&#8221;text\/css&#8221; href=&#8221;&#8216; + TheCSS[WhatCSS] + &#8216;&#8221;>&#8217;) ; &#8211;> &lt;\/script> And [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-537","post","type-post","status-publish","format-standard","hentry","category-general"],"_links":{"self":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/posts\/537","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/comments?post=537"}],"version-history":[{"count":0,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/posts\/537\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/media?parent=537"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/categories?post=537"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lee.org\/blog\/wp-json\/wp\/v2\/tags?post=537"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}