Skip to content

Instantly share code, notes, and snippets.

@TexRx
Forked from micahgodbolt/gist:5052594
Created October 25, 2013 08:30
Show Gist options
  • Save TexRx/7151381 to your computer and use it in GitHub Desktop.
Save TexRx/7151381 to your computer and use it in GitHub Desktop.
$(document).ready(function() {
// Make tabs work
$('.tabs-wrapper .tab-option').hide();
$('.tabs-wrapper .tab-option:first').show();
$('.tabs-wrapper li:first').addClass('active');
$('.tabs-wrapper .tabs li a').click(function(){
$(this).parent().siblings().removeClass('active');
$(this).parent().addClass('active');
var currentTab = $(this).attr('href');
$(this).closest('.tabs-wrapper').find('.tabs-option').hide();
$(currentTab).show();
return false;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment