Created
February 2, 2018 09:09
-
-
Save DevShahidul/7a64fc6d97142e15e34a48a3b6ce08f3 to your computer and use it in GitHub Desktop.
See example here >>> http://www.yourprivateafrica.com/your-private-africa/africa-destinations/
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
| $("ul.tabs").each(function(){ | |
| var $_this = $(this); | |
| $_this.find(">li").eq(0).addClass("active"); | |
| $_this.parent().find("div.tab-content-wrap > div.pane").hide(); | |
| $_this.parent().find("div.tab-content-wrap > div.pane").eq(0).show(); | |
| $_this.find(" >li").each(function(i){ | |
| var $this_li = $(this); | |
| $this_li.find("a").click(function(e){ | |
| e.preventDefault(); | |
| if($this_li.hasClass("active")) return false; | |
| else{ | |
| $_this.find(">li").removeClass("active"); | |
| $this_li.addClass("active"); | |
| $_this.parent().find("div.tab-content-wrap > div.pane").hide(); | |
| $_this.parent().find("div.tab-content-wrap > div.pane").eq(i).show(); | |
| } | |
| }) | |
| }) | |
| }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment