forked from itscodenation/class-randomizer-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
25 lines (18 loc) · 919 Bytes
/
script.js
File metadata and controls
25 lines (18 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
$(document).ready(function(){
$("#studentButton").click(function(){
var Code2College_Students = ["Richard Cole Tomolac", "Abigail Peterson", "Spencer Michalke", "Garrett Michalke","Jorge Moreno","Thomas Cross","Basil Montemayor","Adrian Gamez Rodrigues","Kaci Childers","Rodrigo Martinez","Jerardo Sandoval","Elizabeth Garcia","Alexis Nalls"];
var random = Math.floor(Math.random()* Code2College_Students.length);
console.log(Code2College_Students[random]);
$("#studentDisplay").html(Code2College_Students[random]);
});
$("#teacherButton").click(function(){
var Code2College_Educators = ["Sam", "Samm", "Matt", "Trey"];
var rando = Math.floor(Math.random()* Code2College_Educators.length);
console.log(Code2College_Educators[rando]);
$("#teacherDisplay").html(Code2College_Educators[rando])
});
$("#newstudentButton").click(function(){
$("p").html($("input").val());
console.log($(input).val());
});
});