/ Published in: jQuery
jQuery - Page Component - Tabbed
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('.tabbed .panes .pane').hide(); $('.tabbed nav ul li a').on('click', function(e){ $('.tabbed nav ul li a.active').removeClass('active'); $('.tabbed .panes .pane:visible').hide(); $(this.hash).show(); $(this).addClass('active'); e.preventDefault(); }).filter(':first').click();