- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@emlarson and @JamesSekcienski
First off, I do not like jQuery and agree with moving away from it.
Second, I'm a Python programmer but understand how jQuery works with HTML and can dabble in it when needed 🙂
The reason why your code isn't working is because it's relying on behavior that was present in 1.6 jQuery and was changed for 1.7+ jQuery.
Remember that jQuery on Canvas got updated for security reasons a few months ago, which also probably broke a lot of scripts (including this one!) This very much has shades of when Python moved from 2.x to 3.x and broke backwards compability.
The good news is that I think the fix is one line and it's straightforward.
Find the line
if($(this).attr('checked') == "checked"){
and change it to
if ($(this).prop("checked")) {
Save your custom JS and load it into Beta first, then check with an assignment. I loaded it up in my Canvas beta instance and it looks like it worked and saved the assignment correctly.
Good luck!