Migrate grades_table.js to jQuery