Created
August 7, 2016 18:13
-
-
Save zaurmag/675bda8b0c0f4a553535ec8bbc79f7f2 to your computer and use it in GitHub Desktop.
Табы
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ======= 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