X-Git-Url: https://disinclined.org/git/?a=blobdiff_plain;f=includes%2Ftabs.js;h=79d76bb47474e8dbaa65a40e92285095074a123c;hb=9cae4f3d34fbbdc32dabeba081e2b3d0b837b7e5;hp=92c5ef6869f1c459c77d4d48886392958840301c;hpb=77ad7d89369ca16171b87014f32b72ade198a144;p=dylansserver.git diff --git a/includes/tabs.js b/includes/tabs.js index 92c5ef6..79d76bb 100644 --- a/includes/tabs.js +++ b/includes/tabs.js @@ -1,16 +1,24 @@ $(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; + $(".exhibit").hide(); + var divs = document.getElementsByTagName('div'); + if(document.location.hash){ + $(document.location.hash + '_').show(); + } + 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