-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
116 lines (109 loc) · 4.9 KB
/
index.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Shared Things</title>
<!-- JQuery etc... -->
<!-- <link href="jquery-ui-1.10.4.custom/css/smoothness/jquery-ui-1.10.4.custom.css" rel="stylesheet"> ignore jquery ui styles in favour of bootstrap -->
<script src="bootstrap/js/jquery.min.js"></script>
<script src="jquery-ui-1.10.4.custom/js/jquery-ui-1.10.4.custom.js"></script> <!-- enough jquery ui for dragging -->
<script src="jquery.ui.touch-punch/jquery.ui.touch-punch.min.js"></script> <!-- http://touchpunch.furf.com/ so jquery dragging is touch enabled -->
<!-- Bootstrap -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Include all compiled plugins (below), or include individual files as needed -->
<style>
.draggable { position: fixed; }
</style>
<script>
function logDrag(event, ui){
console.log(JSON.stringify(ui.position) + " " + event.target.id);
}
$(function() {
$("#world img").draggable();
$("#world img").on("dragstart", function(event, ui) { logDrag(event, ui); });
$("#world img").on("dragstop" , function(event, ui) { logDrag(event, ui); });
$("#world img").on("drag" , function(event, ui) { logDrag(event, ui); });
});
</script>
</head>
<body style="padding-top:70px; padding-bottom:70px;" >
<!-- try {.navbar-fixed-top, .navbar-fixed-bottom, .navbar-static-top} X {.navbar-inverse }
have to add padding-top:70px, or padding-bottom:70px for fixed navbar
-->
<nav class="navbar navbar-default navbar-fixed-top navbar-inverse">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Brand</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link</a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left">
<div class="form-group">
<input type="text" class="form-control" placeholder="Search">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
</ul>
</li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="container">
<div class="row">
<div class="col-xs-12">
<div id="world">
<img id="x1" src="images/x.gif" style="z-index:2;" class="draggable" />
<img id="x2" src="images/x.gif" style="z-index:2;" class="draggable" />
<img id="x3" src="images/x.gif" style="z-index:2;" class="draggable" />
<img id="x4" src="images/x.gif" style="z-index:2;" class="draggable" />
<img id="x5" src="images/x.gif" style="z-index:2;" class="draggable" />
<img id="o1" src="images/o.gif" style="z-index:2;" class="draggable" />
<img id="o2" src="images/o.gif" style="z-index:2;" class="draggable" />
<img id="o3" src="images/o.gif" style="z-index:2;" class="draggable" />
<img id="o4" src="images/o.gif" style="z-index:2;" class="draggable" />
<img id="o5" src="images/o.gif" style="z-index:2;" /class="draggable" >
<img id="tttboard" src="images/tictactoe.gif" style="z-index:1;" class="draggable" />
</div>
</div>
</div>
</div>
<!-- Bootstrap -->
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>