-
Notifications
You must be signed in to change notification settings - Fork 368
Expand file tree
/
Copy pathdom.js
More file actions
82 lines (47 loc) · 1.83 KB
/
dom.js
File metadata and controls
82 lines (47 loc) · 1.83 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
/**
@page dom DOM Helpers
@parent jquerymx
@description jQuery DOM extension.
JavaScriptMVC adds a bunch of useful
jQuery extensions for the dom. Check them out on the left.
## [dimensions Dimensions]
Set and animate the inner and outer height and width of elements.
$('#foo').outerWidth(100);
$('#bar').animate({innerWidth: 500});
This is great when you want to include padding and margin in
setting the dimensions of elements.
## [jQuery.cookie Cookie]
Set and get cookie values:
$.cookie('cookie','value');
## [jQuery.fixture Fixture]
Simulate Ajax responses.
$.fixture("/services/tasks.php','fixtures/tasks.json');
Works with jQuery's Ajax converters!
## [jQuery.fn.compare Compare]
Compare the location of two elements rapidly.
$('#foo').compare($('#bar')) & 2 // true if #bar is before #foo
## [jQuery.fn.curStyles CurStyles]
Get multiple css properties quickly.
$('#foo').curStyles('left','top') //-> {left:'20px',top:'10px'}
## [jQuery.fn.formParams FormParams]
Serializes a form into a JSON-like object:
$('form').formParams() //-> {name: 'Justin', favs: ['JS','Ruby']}
## [jQuery.fn.selection Selection]
Gets or sets the current text selection.
// gets selection info
$('pre').selection() //-> {start: 22, end: 57, range: range}
// sets the selection
$('div').selection(20,22)
## [jQuery.fn.within Within]
Returns elements that have a point within their boundaries.
$('.drop').within(200,200) //-> drops that touch 200,200
## [jQuery.Range Range]
Text range utilities.
$('#copy').range() //-> text range that has copy selected
## [jQuery.route]
Hash routes mapped to an [jQuery.Observe $.Observe].
$.route(':type',{type: 'videos'})
$.route.delegate('type','set', function(){ ... })
$.route.attr('type','images');
*/
steal('jquery');