Skip to content

Instantly share code, notes, and snippets.

@iamdustan
Created August 15, 2012 13:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iamdustan/3360241 to your computer and use it in GitHub Desktop.
Save iamdustan/3360241 to your computer and use it in GitHub Desktop.
$('body').on('click', 'a[data-toggle=tab]', function(e) {
var self = $(this)
, target = self.attr('href')
, actives = self.closest('.tabs').find('.active')
actives.removeClass('active')
self.addClass('active')
target.addClass('active')
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment