Posted By

dottDesign on 01/07/11


Tagged

css javascript textmate html


Versions (?)

Background Based on Season


 / Published in: Other
 

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3.  
  4. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  5.  
  6. <head>
  7. <title></title>
  8.  
  9. </head>
  10.  
  11. <body>
  12.  
  13. <script type="text/javascript">
  14.  
  15. var CSS=[['winter.css',12],['spring.css',3],['summer.css',6],['fall.css',9]];
  16. var ToDay=new Date();
  17. CSS.sort(function(a,b){ return b[1]-a[1]; });
  18. for (var style,date,z0=0;z0<CSS.length;z0++){
  19. if (ToDay>new Date(ToDay.getFullYear(),CSS[z0][1]-1,1)){
  20. style=document.createElement('style');
  21. style.type='text/css';
  22. style.src=CSS[z0][0];
  23. break;
  24. }
  25. }
  26.  
  27.  
  28. </script>
  29. </body>
  30.  
  31. </html>

Report this snippet  

You need to login to post a comment.