Using Javascript to Change Button Text

Jump to solution
MattHanes
Community Champion

We are new to Canvas and our teachers are beginning to use it to take online submissions via Assignments. One issue that numerous teachers have emailed me about is that the students are confused by the "Submit Assignment" button. Specifically, they don't understand that they have to click that button first before the URL or File Upload submission box will appear. They are afraid that clicking that button will submit their assignment before they have attached anything.

So we want to try a little pilot in which we change the name of that button from "Submit Assignment" to "Begin Assignment Submission" to see if that will alleviate some of the concerns.

I assume that this can be done via the Javascript override file, but I don't know how to do that. Here is the "Inspect Document" information for that button:

<a href="#" class="btn btn-primary submit_assignment_link " style="margin-top: 5px">Submit Assignment</a>

What can I add to the javascript file that will change the name of that button? Thanks!

1 Solution
MattHanes
Community Champion

I figured it out. Thanks everybody! For anyone looking at this later, here is the code:

$(document).ready(function(){

    $('a.btn.btn-primary.submit_assignment_link').text('Begin Assignment Submission');

});

View solution in original post