-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeal.html
53 lines (51 loc) · 1.74 KB
/
deal.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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="author" content="Flux User">
<meta name="description" content="My Website">
<meta name="keywords" content="Flux, Mac">
<link href="main.css" rel="stylesheet" type="text/css">
<title>Play Bridge</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js">
</script>
<script src="scripts/log4js/log4javascript.js">
</script>
</head>
<body id="deal">
<div id="board">
<div class="myhand">
</div>
</div>
<div class="error"></div>
</body>
<script src="main.js">
</script>
<script>
$("div.error").ajaxError(function(e, jqxhr, settings, exception) {
log.error("ajax error ", exception);
$(this).text( "Triggered ajaxError handler." );
});
$().ready(function(){
jQuery.getJSON("/server/randomHand.py?", {}, function(data){
log.debug("gethand returned ", data);
var hand = data.hand;
log.debug(hand);
var i = 1;
$.each(hand, function(card){
log.debug(hand[card]);
var cls = "card " + hand[card] + " my" + i++;
$("<div/>", {
"class": cls
}).appendTo("div.myhand");
});
});
$(".myhand .card").bind("click", function(){
log.debug("click");
$(this).fadeToggle("slow", "linear");
log.debug("fade");
});
log.debug("ready done");
});
log.debug("load");
</script>
</html>