Last active
September 11, 2017 06:42
-
-
Save dorukcan/f7ac2fbd6df2951f8285 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var COURSES = [ | |
["EC", "101", "09", "N", null], | |
["TK", "221", "51", "C", null], | |
["LIT", "211", "02", "N", null], | |
["MATH", "102", "01", "N", "MATH102 F"], | |
["PHYS", "102", "01", "N", "PHYS102 F"], | |
["FA", "48P", "01", "N", "PHYS125 F"], | |
]; | |
for (i = 0; i < COURSES.length; i++) { | |
$('*[name="abbr' + (i + 1) + '"]').val( COURSES[i][0] ); | |
$('*[name="code' + (i + 1) + '"]').val( COURSES[i][1] ); | |
$('*[name="section' + (i + 1) + '"]').val( COURSES[i][2] ); | |
$('*[name="rnc' + (i + 1) + '"]').filter(function() { | |
return $(this).attr('value') == COURSES[i][3] | |
}).prop("checked", true); | |
$('*[name="rcourse' + (i + 1) + '"]').val( COURSES[i][4] ); | |
} | |
$(".formc[value='Quick Add'").focus(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment