Last active
July 8, 2017 06:46
-
-
Save DevShahidul/69dc24379fb0a676ed33b57229b4d4b8 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
| //aside tab function | |
| $("#asideTabs >li:nth-last-child(2)").addClass('active') | |
| $("#tab-contents >.faq-tab-content").hide() | |
| $("#tab-contents >.faq-tab-content:nth-last-child(2)").show() | |
| $("#asideTabs >li").each(function(i){ | |
| $(this).click(function(){ | |
| if($(this).hasClass('active')) return false | |
| else{ | |
| $("#asideTabs >li").removeClass('active') | |
| $(this).addClass('active') | |
| $("#tab-contents >.faq-tab-content").hide() | |
| $("#tab-contents >.faq-tab-content").eq(i).show() | |
| } | |
| }) | |
| }) | |
| //second step function | |
| $(".faq-tab-content").each(function(){ | |
| var _this = $(this) | |
| _this.find(".accordion-wrap >.accordion").hide() | |
| _this.find(".accordion-wrap >.accordion").eq(0).show() | |
| _this.find(".faq-subTab >li").each(function(i){ | |
| $(this).click(function(){ | |
| if($(this).hasClass('active')) return false | |
| else{ | |
| _this.find(".faq-subTab >li").removeClass('active') | |
| $(this).addClass('active') | |
| _this.find(".accordion-wrap >.accordion").hide() | |
| _this.find(".accordion-wrap >.accordion").eq(i).show() | |
| } | |
| }) | |
| }) | |
| }) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment