jQuery UI Tabs Reference


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. $(document).ready(function(){
  2. $('#example > ul').tabs();
  3. });
  4.  
  5. ====
  6.  
  7. // add slide effect to a tab
  8. $('#example > ul').tabs({ fxSlide: true });
  9.  
  10. // add a fast fade effect to a tab
  11. $('#example > ul').tabs({ fxFade: true, fxSpeed: 'fast' });
  12.  
  13. // add a slide and fade effect
  14. $('#example > ul').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'normal' });
  15.  
  16. // disable one of the tabs (no-zero-based index)
  17. $('#example > ul').tabs({ disabled: [3] });
  18.  
  19. // start with one of the tabs selected (no-zero-based index)
  20. $('#example > ul').tabs(2);
  21.  
  22. // start with one of the tabs selected and another disabled
  23. $('#example > ul').tabs(2, { disabled: [1] });

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.