Guest User

Untitled

a guest
Jan 16th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. div.tab-container div.tab{
  2. min-width: 150px;
  3. width: auto;
  4. height: 25px;
  5. background-color:#3DCCF0;
  6. display:block;
  7. float:left;
  8. padding: 15px 10px 10px 20px;
  9. margin-right: 10px;
  10. cursor: pointer;
  11. font-size: 12px;
  12. color: #fff;
  13. font-weight:bold;
  14. }
  15. div.tab-content div[class^="tab-"]{
  16. display: none;
  17. width: auto;
  18. height: 100%;
  19. float: left;
  20. background-color: inherit;
  21. margin-top: 30px;
  22. background-color: #FFF;
  23. }
  24.  
  25. div.tab-content div[class^="tab-"].active{
  26. display:block;
  27. }
  28.  
  29. $(document).ready(function(){
  30. $('div.tab').click(function(){
  31. var tab_id = $(this).attr('id');
  32. var clickedTab = $(this);
  33.  
  34. $('.tab').removeClass('active');
  35. $('.' + tab_id).removeClass('active');
  36.  
  37. $(this).addClass('active');
  38. $('.' + tab_id).addClass( 'active' );
  39.  
  40. });
  41. });
Add Comment
Please, Sign In to add comment