Posted By

dottDesign on 11/22/11


Tagged

textmate


Versions (?)

Show


 / Published in: Other
 

  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3.  
  4. today=new Date()
  5. thisDay=today.getDay()
  6.  
  7. $("#sunday").hide();
  8. $("#monday").hide();
  9. $("#tuesday").hide();
  10. $("#wednesday").hide();
  11. $("#thursday").hide();
  12. $("#friday").hide();
  13. $("#saturday").hide();
  14.  
  15.  
  16. if (thisDay == 0){
  17. $("#sunday").show();
  18. }
  19.  
  20. if (thisDay == 1){
  21. $("#monday").show();
  22. }
  23. if (thisDay == 2){
  24. $("#tuesday").show();
  25. }
  26. if (thisDay == 3){
  27. $("#wednesday").show();
  28. }
  29. if (thisDay == 4){
  30. $("#thursday").show();
  31. }4
  32.  
  33. if (thisDay == 5){
  34. $("#friday").show();
  35. }
  36. if (thisDay == 6){
  37. $("#saturday").show();
  38. }
  39.  
  40. });
  41. </script>
  42.  
  43.  
  44. div id="sunday">
  45. <h3>Sunday</h3>
  46. </div>
  47. <div id="monday">
  48. <h3>Monday</h3>
  49. </div>
  50. <div id="tuesday">
  51. <h3>Tuesday</h3>
  52. </div>
  53. <div id="wednesday">
  54. <h3>Wednesday</h3>
  55. </div>
  56. <div id="thursday">
  57. <h3>Thrursday</h3>
  58. </div>
  59. <div id="friday">
  60. <h3>Friday</h3>
  61. </div>
  62. <div id="saturday">
  63. <h3>Saturday</h3>
  64. </div>
  65.  

Report this snippet  

You need to login to post a comment.