Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. $(document).ready(function()
  2. {
  3. if (window.location.hash)
  4. {
  5. show(window.location.hash);
  6. }
  7. else
  8. {
  9. show('#overview');
  10. }
  11. });
  12.  
  13. function show(id)
  14. {
  15. $('#overview_div, #coursecontent_div, #profiles_div, #requirements_div, #fees_div').hide();
  16. $('#tabs li a').removeClass("selected");
  17. $(id + '_div').show();
  18. $(id + '_link').addClass("selected");
  19. }
  20.  
  21. DOM:
  22. TAB 1 .tab .tab-first
  23. TAB 2 .tab
  24. TAB 3 .tab
  25. TAB 4 .tab
  26. TAB 5 .tab
  27.  
  28. function hiderighthanddiv(evt)
  29. {
  30. //whatever you want
  31. }
  32.  
  33. function showrighthanddiv(evt)
  34. {
  35. //whatever you want
  36. }
  37.  
  38. $('.tab').not('.tab-first').bind('click',hiderighthanddiv);
  39.  
  40. $('.tab-first').bind('click',showrighthanddiv);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement