AnsweredAssumed Answered

Javascript only works in Pages under Course Navigation?

Question asked by Samuel Chou on Feb 17, 2016
Latest reply on Jun 11, 2016 by James Jones

Does Javascript only work in pages under course navigation and not regular pages? We created a course navigation menu that has a collapsable menu using the following code defined in the sub-account global JS file.


$().ready(function () {

        $( ".panelcontent" ).hide();

        $( ".panelcollapsed" ).click(function() {

        $( ".panelcontent" ).slideToggle( "slow" );



When the anchor element that is assigned the class "panelcollapsed" is clicked, it collapsed the unordered list element assigned the class "panelcontent".


This works fine when the collaspsable menu code sits in the Syllabus page, an Announcement page, even in the Assignment pages. But when the collaspsable menu code is placed in a regular page (under Pages), it does not work. Is there restriction placed on the use of Javascript in a regular Canvas page?