Created
July 6, 2017 13:09
-
-
Save SilencerWeb/0a5226129dd7f809cf993c98e90ac7c3 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
var _document = $(document); | |
_document.on("click", ".tabs__menu-link", function (e) { | |
e.preventDefault(); | |
var _this = $(this), | |
tabs = _this.closest(".tabs"), | |
allTabsMenuItems = tabs.find(".tabs__menu-item"), | |
allTabsContentItems = tabs.find(".tabs__content-item"); | |
allTabsMenuItems.removeClass("tabs__menu-item_active"); | |
_this.parent().addClass("tabs__menu-item_active"); | |
allTabsContentItems.removeClass("tabs__content-item_active animated fadeIn"); | |
allTabsContentItems.eq(_this.parent().index()).addClass("tabs__content-item_active animated fadeIn"); | |
return false; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment