be able to link to innertab

This commit is contained in:
Sanj 2012-01-04 20:27:08 +05:30
parent 25db427349
commit 07d2fe9779

View File

@ -163,7 +163,18 @@ $(document).ready(function() {
//When page loads... //When page loads...
$(".tab_content").hide(); //Hide all content $(".tab_content").hide(); //Hide all content
$("ul.tabsInnerRight li:first").addClass("active").show(); //Activate first tab $("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 //On Click Event
$("ul.tabsInnerRight li").click(function() { $("ul.tabsInnerRight li").click(function() {
$("ul.tabsInnerRight li").removeClass("active"); //Remove any "active" class $("ul.tabsInnerRight li").removeClass("active"); //Remove any "active" class