X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=includes%2Ftabs.js;h=346b76bd9e57b806f1f41ec69ac5aabfbd420185;hb=1cf5e32bfd56c0704ca9857e5574ddd0f5edd42c;hp=57673e5ea02c266388b70421b5ac90d2d9ff7b06;hpb=55f0d1a8de17b3b92ebb6e9d48729bbb66afaa25;p=dylansserver.git diff --git a/includes/tabs.js b/includes/tabs.js index 57673e5..346b76b 100644 --- a/includes/tabs.js +++ b/includes/tabs.js @@ -1,13 +1,28 @@ $(document).ready(function() { - - $("ul.portfolio li").click(function() { - //$("ul.tabs li").removeClass("active"); - $(this).addClass("active"); - $(".exhibit").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