-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.js
More file actions
43 lines (35 loc) · 796 Bytes
/
function.js
File metadata and controls
43 lines (35 loc) · 796 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var someFunction = function (a,b) {
var t = (a*b);
if (t > 100) {
alert ("buy buy buy ")
} else {
alert ( " sell sell sell ")
}
console.log(t)
};
var playBox = function(a,b) {
alert('woo, box!');
}
$("#doSomething").click(function() {
var ay = parseInt($('#base').val());
var bee = parseInt($('#amount').val());
// find the radio
// with a name gametype
// that is checked
// grab its value
var gameType = $('radio[name=gametype]:checked').val();
switch(gameType) {
case 'straight':
playStraight();
break;
case 'box':
playBox(ay, bee);
break;
case 'combo':
playCombo();
break;
default:
alert('Select a game type!');
break;
}
});