forked from rubycdp/cuprite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
72 lines (65 loc) · 1.72 KB
/
Copy pathtest.js
File metadata and controls
72 lines (65 loc) · 1.72 KB
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
$(function() {
$("#datepicker").datepicker();
$("#remove").click(function() {
$("#remove_me").remove()
})
var increment = function(index, oldText) {
return parseInt(oldText || 0) + 1;
}
$("#change_me")
.change(function(event) {
$("#changes").text($(this).val())
})
.bind("input", function(event) {
$("#changes_on_input").text($(this).val())
})
.keydown(function(event) {
$("#changes_on_keydown").text(increment)
$("#value_on_keydown").text($(this).val())
})
.keyup(function(event) {
$("#changes_on_keyup").text(increment)
$("#value_on_keyup").text($(this).val())
})
.keypress(function() {
$("#changes_on_keypress").text(increment)
})
.focus(function(event) {
$("#changes_on_focus").text("Focus")
})
.blur(function() {
$("#changes_on_blur").text("Blur")
})
$("#change_me_color")
.change(function(event) {
$("#changes").text($(this).val())
})
.bind("input", function(event) {
$("#changes_on_input").text($(this).val())
})
$("#browser")
.change(function(event) {
$("#changes").text($(this).val())
$("#target_on_select").text(event.target.nodeName)
})
.focus(function() {
$("#changes_on_focus").text($(this).val())
})
.blur(function() {
$("#changes_on_blur").text($(this).val())
})
$("#open-match")
.click(function() {
if (confirm("{T}ext \\w|th [reg.exp] (chara©+er$)?")) {
$(this).attr("confirmed", "true");
}
})
$("#open-twice")
.click(function() {
if (confirm("Are you sure?")) {
if (!confirm("Are you really sure?")) {
$(this).attr("confirmed", "false");
}
}
})
})