-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickly.js
More file actions
101 lines (95 loc) · 1.55 KB
/
Copy pathquickly.js
File metadata and controls
101 lines (95 loc) · 1.55 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
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
/*
* Div
*/
function div(name){
if(!name){
name = '<div></div>';
}
that = $(name);
that.hasA = function(object){
this.append(object);
this[object.name]=object;
}
that.cursor = function(cursortype){
that.css({'cursor':cursortype});
}
that.name = function(name){
that.data("name", name);
};
return that
}
/*
* Audio
*/
function audio(name){
if(!name){
name = '<audio class="music"></audio>';
}
that = $(name);
that.src = function(source){
that.append($('<source src="audio/music.ogg" type="audio/ogg" />'));
that.find('source').attr("src", source);
}
that.loop = function(loop){
if(loop){
this.attr("loop", "loop");
}else{
this.attr("loop", null);
}
}
that.play = function(){
this[0].play();
}
that.pause = function(){
this[0].pause();
}
that.paused = function(){
return this[0].paused;
}
return that;
}
/*
* Form
*/
function form(name){
if(!name){
name = '<form></form>'
}
that = $(name);
that.name = function(name){
that.data("name", name);
};
return that
}
/*
* Audio
*/
function image(name){
if(!name){
name='<img src="" />';
}
that = $(name);
that.name = function(name){
that.data("name", name);
};
that.src = function(source){
that.attr("src", source);
}
that.cursor = function(cursortype){
that.css({'cursor':cursortype});
}
return that;
}
/*
* Body
*/
function body(){
return $('body');
}
/*
* clearBoth
*/
function clearBoth(){
that = $('<div style="clear:both;"></div>');
return that;
}