Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.71 KB | None | 0 0
  1. <div class="tab" style="margin-top: 1.6%;">
  2. <button class="tablinks" onclick="openCity(event, 'Sun0')">Sun</button>
  3. <button class="tablinks" onclick="openCity(event, 'Mon0')">Mon</button>
  4. <button class="tablinks" onclick="openCity(event, 'Tue0')">Tue</button>
  5. <button class="tablinks" onclick="openCity(event, 'Wed0')">Wed</button>
  6. <button class="tablinks" onclick="openCity(event, 'Thu0')">Thu</button>
  7. <button class="tablinks" onclick="openCity(event, 'Fri0')">Fri</button>
  8.  
  9. document.getElementsByClassName('tablinks').click()
  10. function openCity(evt, cityName) {
  11. var i, tabcontent, tablinks;
  12. tabcontent = document.getElementsByClassName("tabcontent");
  13. for (i = 0; i < tabcontent.length; i++) {
  14. tabcontent[i].style.display = "none";
  15. }
  16. tablinks = document.getElementsByClassName("tablinks");
  17. for (i = 0; i < tablinks.length; i++) {
  18. tablinks[i].className = tablinks[i].className.replace(" active", "");
  19. }
  20. document.getElementById(cityName).style.display = "block";
  21. evt.currentTarget.className += " active";
  22. }
  23.  
  24. <div id="Sun0" class="tabcontent">
  25.  
  26. <!--Sunday-->
  27. <div style="overflow-x:auto;">
  28. <p> Contents of Sun0 </p>
  29. </div>
  30.  
  31. <div id="Mon0" class="tabcontent">
  32.  
  33. <!--Monday-->
  34. <div style="overflow-x:auto;">
  35. <p> Contents of Sun0 </p>
  36. </div>
  37.  
  38. <div id="Tue0" class="tabcontent">
  39.  
  40. <!--Tueday-->
  41. <div style="overflow-x:auto;">
  42. <p> Contents of Sun0 </p>
  43. </div>
  44.  
  45. <div id="Wed0" class="tabcontent">
  46.  
  47. <!--Wenesday-->
  48. <div style="overflow-x:auto;">
  49. <p> Contents of Sun0 </p>
  50. </div>
  51.  
  52. <div id="Thu0" class="tabcontent">
  53.  
  54. <!--Thursday-->
  55. <div style="overflow-x:auto;">
  56. <p> Contents of Sun0 </p>
  57. </div>
  58.  
  59. <div id="Fri0" class="tabcontent">
  60.  
  61. <!-Friday-->
  62. <div style="overflow-x:auto;">
  63. <p> Contents of Sun0 </p>
  64. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement