Skip to content

Instantly share code, notes, and snippets.

@zaurmag
Created August 7, 2016 18:13
Show Gist options
  • Save zaurmag/675bda8b0c0f4a553535ec8bbc79f7f2 to your computer and use it in GitHub Desktop.
Save zaurmag/675bda8b0c0f4a553535ec8bbc79f7f2 to your computer and use it in GitHub Desktop.
Табы
// ======= Tabs Function =======
(function($) {
$.fn.tabs = function() {
this.each(function() {
$(this).on('click', 'li:not(.active)', function() {
$(this)
.addClass('active').siblings().removeClass('active')
.closest('.tabs').find('.tab-block').removeClass('active').eq($(this).index()).addClass('active');
return false;
});
});
};
})(jQuery);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment