From 07d2fe97799b181a85ab82b1fcb7d0fdfb25ac80 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 4 Jan 2012 20:27:08 +0530 Subject: [PATCH] be able to link to innertab --- itf/templates/modules/festival/meeting.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/itf/templates/modules/festival/meeting.html b/itf/templates/modules/festival/meeting.html index 433469c..6e238ea 100755 --- a/itf/templates/modules/festival/meeting.html +++ b/itf/templates/modules/festival/meeting.html @@ -163,7 +163,18 @@ $(document).ready(function() { //When page loads... $(".tab_content").hide(); //Hide all content $("ul.tabsInnerRight li:first").addClass("active").show(); //Activate first tab - $(".tab_content:first").show(); //Show first tab content + var State = History.getState(); +// console.log(State); + var queryData = QueryStringToJSON(State.hash); //FIXME: ideally this would go into global doState function + if (queryData.hasOwnProperty("innerTab")) { + if ($('#' + queryData.innerTab).length > 0) { + $('#' + queryData.innerTab).show(); + } else { + $('.tab_content:first').show(); + } + } else { + $(".tab_content:first").show(); //Show first tab content + } //On Click Event $("ul.tabsInnerRight li").click(function() { $("ul.tabsInnerRight li").removeClass("active"); //Remove any "active" class