Advertisement
Guest User

Untitled

a guest
Feb 21st, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.08 KB | None | 0 0
  1. div#tabcontainer {
  2. position: relative;
  3. height: 27px;
  4. }
  5.  
  6.  
  7. .current {
  8. background-image: url('tab_current.gif');
  9. z-index: 2;
  10. position: relative;
  11. float: left;
  12. left: 0px;
  13. height: 20px;
  14. width: 126px;
  15. text-align: center;
  16. padding-top: 7px;
  17. font-weight: bold;
  18. margin-right: -5px;
  19. }
  20.  
  21. .notcurrent {
  22. background-image: url('tab_not_current.gif');
  23. z-index: 1;
  24. cursor: pointer;
  25. position: relative;
  26. float: left;
  27. left: 0px;
  28. height: 20px;
  29. width: 126px;
  30. text-align: center;
  31. padding-top: 7px;
  32. font-weight: bold;
  33. margin-right: -5px;
  34. }
  35.  
  36. .visible {
  37. display: block
  38. }
  39.  
  40. .hidden {
  41. display: none
  42. }
  43.  
  44. function openTab(sectid, tabid)
  45. {
  46. var a = document.getElementsByTagName("div");
  47. for(i=0;i<a.length;i++)
  48. {
  49. if(a[i].className=="visible")
  50. {
  51. a[i].className="hidden";
  52. }
  53. if(a[i].className=="current")
  54. {
  55. a[i].className="notcurrent";
  56. }
  57. }
  58. document.getElementById(sectid).className="visible";
  59. tabid.className="current";
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement