Skip to content

Commit af7faca

Browse files
committed
Fix Active Section Bug
1 parent e86a648 commit af7faca

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

demo/code-demo/scripts/index.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ function OpenSampleSection() {
1616
});
1717
}
1818

19+
SetActiveStyle("#top-sample");
20+
1921
$(".content").hide();
2022
$("#sampleContent").show();
2123
}
@@ -27,6 +29,14 @@ function OpenDocumentationSection() {
2729
documentationContentLoaded = true;
2830
}
2931

32+
SetActiveStyle("#top-docs");
33+
3034
$(".content").hide();
3135
$("#documentationContent").show();
36+
}
37+
38+
function SetActiveStyle(id)
39+
{
40+
$("#top-ul li").removeClass("top-li-active");
41+
$(id).addClass("top-li-active");
3242
}

0 commit comments

Comments
 (0)