JerryBeaucaire
2 months agoCommunity Member
Javascript question - Hide the "Next Module" button in Litmos.
We use Litmos as our LMS. We want users to be able to use the convenient "Next Module" button in the upper right corner. But this can also be used to "skip" to the next module, which we don't want. So we'd like JS to hide the element at the beginning of a course, then enable it again on the last slide.
When I inspect the clickable element in the upper menu bar, this is the info:
<a class="m-nav-item pull-right hidden-xs" href="#" onclick="scormPlayer.next();" id="module_Next">
<div class="m-nav-btn">
<i class="fa fa-fast-forward" aria-hidden="true"></i> Next module
</div>
</a>
Can I get an assist on the code to HIDE this element, and re=enable it later?
Things I tried unsuccessfully:
let div = document.querySelector("#module_Next");
div.style.display = 'none';
const tab1 = document.querySelector("#fa fa-fast-backward");
tab1.style.display = "none";
var nextmodule = document.getElementById('Next module');
nextmodule.style.display = "none";