-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
executable file
·56 lines (49 loc) · 1.35 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
<!DOCTYPE html>
<html>
<head>
<title>Oleg Taranenko's Quiz for Bryntum</title>
<!-- 1. Quiz question -->
<script type="text/javascript" src="flatArray.js"></script>
<!-- 2. Quiz question -->
<script type="text/javascript" src="regExp.js"></script>
<!-- 3. Quiz question -->
<style type="text/css">
ul.somelist li:hover {
background-color: lightgray;
}
</style>
<script type="text/javascript" src="http://cdn.sencha.com/ext-4.1.1-gpl/ext-all-debug.js"></script>
<script type="text/javascript">
</script>
<script type="text/javascript" src="scope.js"></script>
<!--<script type="text/javascript" src="gridRefresh.js"></script>-->
</head>
<body>
<div>
<!-- 3. & 8. Quiz question -->
<ul class='somelist'>
<li>one</li>
<li>two</li>
<li>three</li>
</ul>
</div>
<div id="quiz4"></div>
<div id="quiz5"></div>
</body>
<script type="text/javascript">
Ext.onReady(function() {
var body = Ext.getBody();
var a = Ext.widget('mypanel', {
renderTo: body
});
// quiz 8
var ul = body.query('ul.somelist')[0];
Ext.fly(ul).on('click', function(e, target) {
console.log(arguments);
alert(target.innerText + ' pressed');
}, null, {
delegate: 'li'
});
})
</script>
</html>