Skip to content

Instantly share code, notes, and snippets.

@DevShahidul
Last active July 8, 2017 06:46
Show Gist options
  • Select an option

  • Save DevShahidul/69dc24379fb0a676ed33b57229b4d4b8 to your computer and use it in GitHub Desktop.

Select an option

Save DevShahidul/69dc24379fb0a676ed33b57229b4d4b8 to your computer and use it in GitHub Desktop.
//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