Skip to content

Instantly share code, notes, and snippets.

@micahgodbolt
Forked from jponch-zz/gist:5052089
Last active December 14, 2015 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save micahgodbolt/5052594 to your computer and use it in GitHub Desktop.
Save micahgodbolt/5052594 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