-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLil.js
More file actions
32 lines (28 loc) · 824 Bytes
/
Lil.js
File metadata and controls
32 lines (28 loc) · 824 Bytes
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
/********************************************************
* Project : Lil.js
* Author : David Young
* Date : May 16, 2013
* Homepage : github.com/davidyoung604/Lil.js
* Copyright : All rights reserved.
* Licence : Free for personal or business use as long as
* you keep the attributions intact and do not
* charge for it.
********************************************************/
var Lil = {
version: "0.1.1",
init: function(id) {
self = Lil;
self.selector = id;
self.target = document.getElementById(id);
return self;
},
raw: function() {
return self.target;
},
on: function(event, func) {
self.target.addEventListener(event, func);
}
};
window.$ = function(id) {
return new Lil.init(id);
};