-
Notifications
You must be signed in to change notification settings - Fork 0
/
gfdg.html
81 lines (69 loc) · 2.93 KB
/
gfdg.html
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html>
<head>
<title>Patient Questionnaire</title>
<meta charset=utf-8 />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--My Own CSS-->
<link rel="stylesheet" href="themes/formatting.css" />
<!--JQuery Mobile CSS-->
<link rel="stylesheet" href="themes/MyTheme.css" />
<link rel="stylesheet" href="themes/jquery.mobile.icons.min.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" />
<!--<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>-->
<!--JQuery Mobile JavaScript-->
<script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script>
<!--External scripts needed for date-picker-->
<link rel="stylesheet" href="http://code.jquery.com/mobile/git/jquery.mobile-git.css" />
<link rel="stylesheet" href="https://rawgithub.com/arschmitz/jquery-mobile-datepicker-wrapper/master/jquery.mobile.datepicker.css" />
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script src="https://rawgithub.com/jquery/jquery-ui/1-10-stable/ui/jquery.ui.datepicker.js"></script>
<script src="http://code.jquery.com/mobile/git/jquery.mobile-git.js"></script>
<script src="https://rawgithub.com/arschmitz/jquery-mobile-datepicker-wrapper/master/jquery.mobile.datepicker.js"></script>
<!--Extrenal scripts needed for knockout library-->
<script type='text/javascript' src='knockout-3.1.0.js'></script>
<!--External scripts needed for imagemapster plugin-->
<!--<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>-->
<script src="jquery.imagemapster.js"></script>
</head>
<body>
<input id="btnToEnable" type="button" value="gjgj" data-bind="jEnable: isEnabled" />
<div id="test" style="background:green; width:300px; height: 300px;">
Whats up</div>
<button data-bind="click: clickMe" type="button">Click Me!</button>
<script>
if (ko && ko.bindingHandlers) {
ko.bindingHandlers['jEnable'] = {
'update': function(element, valueAccessor) {
var value = ko.utils.unwrapObservable(valueAccessor());
var $element = $(element);
$element.prop("disabled", !value);
if ($element.hasClass("ui-button")) {
$element.button("option", "disabled", !value);
}
}
};
}
$("#btnToEnable").button();
var viewModel = {
isEnabled: ko.observable(true),
numberOfClicks : ko.observable(0),
clickMe : function() {
alert("Your Reaction time was... milliseconds.");}
};
ko.applyBindings(viewModel);
var done = false;
var t0;
var rand = Math.random() * 5 + 3;
$("#test").on('touchstart', startTimeOut(e));
function turnGreen()
{
if (done)
{
var t1 = Date.now();
$("#test").css("background", "green");
}
}
</script>
</body>
</html>