-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjQuery.js
More file actions
56 lines (44 loc) · 1.21 KB
/
jQuery.js
File metadata and controls
56 lines (44 loc) · 1.21 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
$(document).ready(function() {
$("#qloaded").text("Document has been loaded with jQuery");
});
$("#qclick").click(()=>{
$("#qclick").text("Clicked with jQuery");
})
$("#qclick2").dblclick(()=>{
$("#qclick2").text("Double clicked with jQuery");
})
$(document).keydown((e)=>{
$("#qpressed").text(e.key + " pressed with jQuery");
})
$("#mouseover").mouseover(()=>{
$("#qover").text("Mouse over with jQuery");
})
$("#qvalue").click(()=>{
$("#qvalue").text("Changed with jQuery");
})
$("#imgload").click(()=>{
$("#qload").text("Image loaded with jQuery");
})
$("#imgnotload").click(()=>{
$("#qnotload").text("Image didn't load with jQuery");
})
$('form').on('submit', function(e){
e.preventDefault();
$("#qsubmit").text("Submit with jQuery")
});
var items = ["Apple", "Orange", "Banana"];
for (var i = 0; i < items.length; i++){
var item = items[i];
var element = $("<option></option>");
element.text(item);
$('#mySelectq').append(element);
}
$("#mouseover2").mouseover(()=>{
$("#qover2").text("Mouse over with jQuery");
})
$('#qcheck').click(()=>{
$('#qcheckbox').prop("checked", true);
})
$('#qul').click(function(e){
$('#qulclick').text(e.target.innerHTML);
})