Fixing inline JS for CCX navigation

This commit is contained in:
Chris Rodriguez
2016-08-24 11:13:13 -04:00
parent 9af50a7550
commit f94e665e86

View File

@@ -89,9 +89,9 @@ from openedx.core.djangolib.js_utils import (
<script>
function setup_tabs() {
$(".instructor-nav a").on("click", function(event) {
$(".instructor-nav .btn-link").on("click", function(event) {
event.preventDefault();
$(".instructor-nav a").removeClass("active-section");
$(".instructor-nav .btn-link").removeClass("active-section");
var section_sel = "#" + $(this).attr("data-section");
$("section.idash-section").hide();
$(section_sel).show();
@@ -101,12 +101,12 @@ from openedx.core.djangolib.js_utils import (
var url = document.URL,
hashbang = url.indexOf('#!');
if (hashbang != -1) {
var selector = '.instructor-nav a[data-section=' +
var selector = '.instructor-nav [data-section=' +
url.substr(hashbang + 2) + ']';
$(selector).click();
}
else {
$(".instructor-nav a").first().click();
$(".instructor-nav .btn-link").first().click();
}
}