X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=includes%2Ftabs.js;h=346b76bd9e57b806f1f41ec69ac5aabfbd420185;hb=2cf7880d4afdde09707d4fc62e82597d6bfea7a0;hp=9107b0c15aba373dbe146b1f304d67429cb42c5b;hpb=56af548973e9bbce1bd052c4cc84f11a19e4fbf2;p=dylansserver.git diff --git a/includes/tabs.js b/includes/tabs.js index 9107b0c..346b76b 100644 --- a/includes/tabs.js +++ b/includes/tabs.js @@ -1,14 +1,28 @@ $(document).ready(function() { - - $(".tabs").hide(); - $("ul.portfolio li").click(function() { - //$("ul.tabs li").removeClass("active"); - $(this).addClass("active"); + 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).find("a").attr("href"); - $(activeTab).fadeIn(); - return false; + 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