Posted By

onefastsnail on 05/24/12


Tagged


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

mister
hurcy


simple tabs


 / Published in: JavaScript
 

  1. $(function () {
  2. var tabContainers = $('div.tabs > div');
  3. tabContainers.hide().filter(':first').show();
  4.  
  5. $('div.tabs ul.tabNavigation a').click(function () {
  6. tabContainers.hide();
  7. tabContainers.filter(this.hash).show();
  8. $('div.tabs ul.tabNavigation a').removeClass('selected');
  9. $(this).addClass('selected');
  10. return false;
  11. }).filter(':first').click();
  12. });
  13.  

Report this snippet  

You need to login to post a comment.