Change-Id: I70f978ffd2248973a43ff1fe1dec2b0ac78cb63b
link = $("#version-tabs a[href$="+sectionId+"]");
link.parent().addClass("selected");
link.parent().siblings().removeClass("selected");
- $(".version-section").hide();
- $(link.attr("href")).show();
+
+ sectionDiv = $(".version-section"+link.attr("href"));
+ if (sectionDiv.length) {
+ $(".version-section").hide();
+ sectionDiv.show();
+ }
+
$('html, body').animate({
scrollTop: $(hashy).offset().top
}, 100);