X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=includes%2Ftabs.js;h=346b76bd9e57b806f1f41ec69ac5aabfbd420185;hb=2cf7880d4afdde09707d4fc62e82597d6bfea7a0;hp=92c5ef6869f1c459c77d4d48886392958840301c;hpb=77ad7d89369ca16171b87014f32b72ade198a144;p=dylansserver.git diff --git a/includes/tabs.js b/includes/tabs.js index 92c5ef6..346b76b 100644 --- a/includes/tabs.js +++ b/includes/tabs.js @@ -1,16 +1,28 @@ $(document).ready(function() { - $(".content").hide(); - $("ul.tabs li:first").addClass("active").show(); - $(".content:first").show(); - - $("ul.tabs li").click(function() { - $("ul.tabs li").removeClass("active"); - $(this).addClass("active"); - $(".content").hide(); - - var activeTab = $(this).find("a").attr("href"); - $(activeTab).fadeIn(); - return false; + if(document.location.hash){ + $(document.location.hash + '_').show(); + } + $("ul#portfolio li a.tab").each(function(){ + if (document.location.href.indexOf($(this).attr("href")) == 0) { + $("#" + this.attr("href")).show("slide", 600); + } + $(this).attr("href", "#" + $(this).attr("href")); + }); + var divs = document.getElementsByTagName('div'); + var i = 0; + $("ul#portfolio li a.tab").click(function() { + i++; + $(".exhibit").hide(); + var activeTab = $(this).attr("href") + '_'; + if (i==1) + $(activeTab).show("slide", 600); + else + $(activeTab).show("puff", 600); + $(activeTab).addClass("active_exhibit"); + }); + $('#showdivs').click(function() { + for(i=0;i