fomantic-ui-sass 2.9.0 → 2.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/app/assets/fonts/semantic-ui/Lato-Bold.woff +0 -0
- data/app/assets/fonts/semantic-ui/Lato-Bold.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/Lato-BoldItalic.woff +0 -0
- data/app/assets/fonts/semantic-ui/Lato-BoldItalic.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/Lato-Italic.woff +0 -0
- data/app/assets/fonts/semantic-ui/Lato-Italic.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/Lato-Regular.woff +0 -0
- data/app/assets/fonts/semantic-ui/Lato-Regular.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/LatoLatin-Bold.woff +0 -0
- data/app/assets/fonts/semantic-ui/LatoLatin-Bold.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/LatoLatin-BoldItalic.woff +0 -0
- data/app/assets/fonts/semantic-ui/LatoLatin-BoldItalic.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/LatoLatin-Italic.woff +0 -0
- data/app/assets/fonts/semantic-ui/LatoLatin-Italic.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/LatoLatin-Regular.woff +0 -0
- data/app/assets/fonts/semantic-ui/LatoLatin-Regular.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/brand-icons.woff +0 -0
- data/app/assets/fonts/semantic-ui/brand-icons.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/icons.woff +0 -0
- data/app/assets/fonts/semantic-ui/icons.woff2 +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.woff +0 -0
- data/app/assets/fonts/semantic-ui/outline-icons.woff2 +0 -0
- data/app/assets/javascripts/semantic-ui/accordion.js +569 -596
- data/app/assets/javascripts/semantic-ui/api.js +1158 -1180
- data/app/assets/javascripts/semantic-ui/calendar.js +1935 -1810
- data/app/assets/javascripts/semantic-ui/checkbox.js +843 -842
- data/app/assets/javascripts/semantic-ui/dimmer.js +707 -738
- data/app/assets/javascripts/semantic-ui/dropdown.js +4196 -4237
- data/app/assets/javascripts/semantic-ui/embed.js +646 -676
- data/app/assets/javascripts/semantic-ui/flyout.js +1503 -1466
- data/app/assets/javascripts/semantic-ui/form.js +2035 -2007
- data/app/assets/javascripts/semantic-ui/modal.js +1552 -1487
- data/app/assets/javascripts/semantic-ui/nag.js +521 -527
- data/app/assets/javascripts/semantic-ui/popup.js +1469 -1457
- data/app/assets/javascripts/semantic-ui/progress.js +944 -998
- data/app/assets/javascripts/semantic-ui/rating.js +508 -524
- data/app/assets/javascripts/semantic-ui/search.js +1521 -1535
- data/app/assets/javascripts/semantic-ui/shape.js +762 -811
- data/app/assets/javascripts/semantic-ui/sidebar.js +1042 -1100
- data/app/assets/javascripts/semantic-ui/site.js +437 -477
- data/app/assets/javascripts/semantic-ui/slider.js +1311 -1312
- data/app/assets/javascripts/semantic-ui/state.js +639 -658
- data/app/assets/javascripts/semantic-ui/sticky.js +848 -902
- data/app/assets/javascripts/semantic-ui/tab.js +903 -967
- data/app/assets/javascripts/semantic-ui/toast.js +911 -885
- data/app/assets/javascripts/semantic-ui/transition.js +998 -1078
- data/app/assets/javascripts/semantic-ui/visibility.js +1214 -1246
- data/app/assets/stylesheets/semantic-ui/collections/_breadcrumb.scss +7 -7
- data/app/assets/stylesheets/semantic-ui/collections/_form.scss +311 -377
- data/app/assets/stylesheets/semantic-ui/collections/_grid.scss +191 -331
- data/app/assets/stylesheets/semantic-ui/collections/_menu.scss +302 -439
- data/app/assets/stylesheets/semantic-ui/collections/_message.scss +127 -199
- data/app/assets/stylesheets/semantic-ui/collections/_table.scss +549 -776
- data/app/assets/stylesheets/semantic-ui/elements/_button.scss +711 -1123
- data/app/assets/stylesheets/semantic-ui/elements/_container.scss +9 -8
- data/app/assets/stylesheets/semantic-ui/elements/_divider.scss +45 -63
- data/app/assets/stylesheets/semantic-ui/elements/_emoji.scss +3558 -3558
- data/app/assets/stylesheets/semantic-ui/elements/_flag.scss +272 -270
- data/app/assets/stylesheets/semantic-ui/elements/_header.scss +120 -144
- data/app/assets/stylesheets/semantic-ui/elements/_icon.scss +667 -747
- data/app/assets/stylesheets/semantic-ui/elements/_image.scss +41 -65
- data/app/assets/stylesheets/semantic-ui/elements/_input.scss +416 -300
- data/app/assets/stylesheets/semantic-ui/elements/_label.scss +361 -412
- data/app/assets/stylesheets/semantic-ui/elements/_list.scss +51 -72
- data/app/assets/stylesheets/semantic-ui/elements/_loader.scss +69 -157
- data/app/assets/stylesheets/semantic-ui/elements/_placeholder.scss +24 -44
- data/app/assets/stylesheets/semantic-ui/elements/_rail.scss +17 -22
- data/app/assets/stylesheets/semantic-ui/elements/_reveal.scss +46 -85
- data/app/assets/stylesheets/semantic-ui/elements/_segment.scss +173 -227
- data/app/assets/stylesheets/semantic-ui/elements/_step.scss +79 -152
- data/app/assets/stylesheets/semantic-ui/elements/_text.scss +34 -34
- data/app/assets/stylesheets/semantic-ui/globals/_reset.scss +10 -15
- data/app/assets/stylesheets/semantic-ui/globals/_site.scss +29 -51
- data/app/assets/stylesheets/semantic-ui/modules/_accordion.scss +37 -55
- data/app/assets/stylesheets/semantic-ui/modules/_calendar.scss +26 -29
- data/app/assets/stylesheets/semantic-ui/modules/_checkbox.scss +159 -230
- data/app/assets/stylesheets/semantic-ui/modules/_dimmer.scss +55 -174
- data/app/assets/stylesheets/semantic-ui/modules/_dropdown.scss +261 -393
- data/app/assets/stylesheets/semantic-ui/modules/_embed.scss +21 -32
- data/app/assets/stylesheets/semantic-ui/modules/_flyout.scss +97 -143
- data/app/assets/stylesheets/semantic-ui/modules/_modal.scss +122 -156
- data/app/assets/stylesheets/semantic-ui/modules/_nag.scss +55 -65
- data/app/assets/stylesheets/semantic-ui/modules/_popup.scss +573 -206
- data/app/assets/stylesheets/semantic-ui/modules/_progress.scss +108 -213
- data/app/assets/stylesheets/semantic-ui/modules/_rating.scss +83 -124
- data/app/assets/stylesheets/semantic-ui/modules/_search.scss +71 -100
- data/app/assets/stylesheets/semantic-ui/modules/_shape.scss +16 -32
- data/app/assets/stylesheets/semantic-ui/modules/_sidebar.scss +105 -208
- data/app/assets/stylesheets/semantic-ui/modules/_slider.scss +102 -127
- data/app/assets/stylesheets/semantic-ui/modules/_sticky.scss +3 -7
- data/app/assets/stylesheets/semantic-ui/modules/_tab.scss +12 -16
- data/app/assets/stylesheets/semantic-ui/modules/_toast.scss +71 -149
- data/app/assets/stylesheets/semantic-ui/modules/_transition.scss +371 -1282
- data/app/assets/stylesheets/semantic-ui/views/_ad.scss +36 -47
- data/app/assets/stylesheets/semantic-ui/views/_card.scss +221 -367
- data/app/assets/stylesheets/semantic-ui/views/_comment.scss +43 -61
- data/app/assets/stylesheets/semantic-ui/views/_feed.scss +37 -59
- data/app/assets/stylesheets/semantic-ui/views/_item.scss +87 -134
- data/app/assets/stylesheets/semantic-ui/views/_statistic.scss +77 -118
- data/lib/fomantic/ui/sass/version.rb +2 -2
- data/tasks/converter.rb +1 -1
- metadata +17 -1
@@ -1,968 +1,914 @@
|
|
1
1
|
/*!
|
2
2
|
* # Fomantic-UI - Sticky
|
3
|
-
*
|
3
|
+
* https://github.com/fomantic/Fomantic-UI/
|
4
4
|
*
|
5
5
|
*
|
6
6
|
* Released under the MIT license
|
7
|
-
*
|
7
|
+
* https://opensource.org/licenses/MIT
|
8
8
|
*
|
9
9
|
*/
|
10
10
|
|
11
|
-
|
11
|
+
(function ($, window, document) {
|
12
|
+
'use strict';
|
12
13
|
|
13
|
-
|
14
|
+
function isFunction(obj) {
|
15
|
+
return typeof obj === 'function' && typeof obj.nodeType !== 'number';
|
16
|
+
}
|
14
17
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
+
window = window !== undefined && window.Math === Math
|
19
|
+
? window
|
20
|
+
: globalThis;
|
18
21
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
;
|
22
|
+
$.fn.sticky = function (parameters) {
|
23
|
+
var
|
24
|
+
$allModules = $(this),
|
25
|
+
$document = $(document),
|
26
|
+
moduleSelector = $allModules.selector || '',
|
25
27
|
|
26
|
-
|
27
|
-
|
28
|
-
$allModules = $(this),
|
29
|
-
moduleSelector = $allModules.selector || '',
|
28
|
+
time = Date.now(),
|
29
|
+
performance = [],
|
30
30
|
|
31
|
-
|
32
|
-
|
31
|
+
query = arguments[0],
|
32
|
+
methodInvoked = typeof query === 'string',
|
33
|
+
queryArguments = [].slice.call(arguments, 1),
|
34
|
+
returnedValue
|
35
|
+
;
|
33
36
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
$allModules
|
41
|
-
.each(function() {
|
42
|
-
var
|
43
|
-
settings = ( $.isPlainObject(parameters) )
|
44
|
-
? $.extend(true, {}, $.fn.sticky.settings, parameters)
|
45
|
-
: $.extend({}, $.fn.sticky.settings),
|
37
|
+
$allModules.each(function () {
|
38
|
+
var
|
39
|
+
settings = $.isPlainObject(parameters)
|
40
|
+
? $.extend(true, {}, $.fn.sticky.settings, parameters)
|
41
|
+
: $.extend({}, $.fn.sticky.settings),
|
46
42
|
|
47
|
-
|
48
|
-
|
49
|
-
|
43
|
+
className = settings.className,
|
44
|
+
namespace = settings.namespace,
|
45
|
+
error = settings.error,
|
50
46
|
|
51
|
-
|
52
|
-
|
47
|
+
eventNamespace = '.' + namespace,
|
48
|
+
moduleNamespace = 'module-' + namespace,
|
53
49
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
50
|
+
$module = $(this),
|
51
|
+
$window = $(window),
|
52
|
+
$scroll = [window, document].indexOf(settings.scrollContext) < 0 ? $document.find(settings.scrollContext) : $(settings.scrollContext),
|
53
|
+
$container,
|
54
|
+
$context,
|
59
55
|
|
60
|
-
|
56
|
+
instance = $module.data(moduleNamespace),
|
61
57
|
|
62
|
-
|
63
|
-
|| window.mozRequestAnimationFrame
|
64
|
-
|| window.webkitRequestAnimationFrame
|
65
|
-
|| window.msRequestAnimationFrame
|
66
|
-
|| function(callback) { setTimeout(callback, 0); },
|
58
|
+
element = this,
|
67
59
|
|
68
|
-
|
60
|
+
documentObserver,
|
61
|
+
observer,
|
62
|
+
module
|
63
|
+
;
|
69
64
|
|
70
|
-
|
71
|
-
observer,
|
72
|
-
module
|
73
|
-
;
|
65
|
+
module = {
|
74
66
|
|
75
|
-
|
67
|
+
initialize: function () {
|
68
|
+
module.determineContainer();
|
69
|
+
module.determineContext();
|
70
|
+
module.verbose('Initializing sticky', settings, $container);
|
76
71
|
|
77
|
-
|
72
|
+
module.save.positions();
|
73
|
+
module.checkErrors();
|
74
|
+
module.bind.events();
|
78
75
|
|
79
|
-
|
80
|
-
|
81
|
-
|
76
|
+
if (settings.observeChanges) {
|
77
|
+
module.observeChanges();
|
78
|
+
}
|
79
|
+
module.instantiate();
|
80
|
+
},
|
82
81
|
|
83
|
-
|
84
|
-
|
85
|
-
|
82
|
+
instantiate: function () {
|
83
|
+
module.verbose('Storing instance of module', module);
|
84
|
+
instance = module;
|
85
|
+
$module
|
86
|
+
.data(moduleNamespace, module)
|
87
|
+
;
|
88
|
+
},
|
86
89
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
90
|
+
destroy: function () {
|
91
|
+
module.verbose('Destroying previous instance');
|
92
|
+
module.reset();
|
93
|
+
if (documentObserver) {
|
94
|
+
documentObserver.disconnect();
|
95
|
+
}
|
96
|
+
if (observer) {
|
97
|
+
observer.disconnect();
|
98
|
+
}
|
99
|
+
$window
|
100
|
+
.off('load' + eventNamespace, module.event.load)
|
101
|
+
.off('resize' + eventNamespace, module.event.resize)
|
102
|
+
;
|
103
|
+
$scroll
|
104
|
+
.off('scrollchange' + eventNamespace, module.event.scrollchange)
|
105
|
+
;
|
106
|
+
$module.removeData(moduleNamespace);
|
107
|
+
},
|
92
108
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
109
|
+
observeChanges: function () {
|
110
|
+
if ('MutationObserver' in window) {
|
111
|
+
documentObserver = new MutationObserver(module.event.documentChanged);
|
112
|
+
observer = new MutationObserver(module.event.changed);
|
113
|
+
documentObserver.observe(document, {
|
114
|
+
childList: true,
|
115
|
+
subtree: true,
|
116
|
+
});
|
117
|
+
observer.observe(element, {
|
118
|
+
childList: true,
|
119
|
+
subtree: true,
|
120
|
+
});
|
121
|
+
observer.observe($context[0], {
|
122
|
+
childList: true,
|
123
|
+
subtree: true,
|
124
|
+
});
|
125
|
+
module.debug('Setting up mutation observer', observer);
|
126
|
+
}
|
127
|
+
},
|
100
128
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
observer.disconnect();
|
109
|
-
}
|
110
|
-
$window
|
111
|
-
.off('load' + eventNamespace, module.event.load)
|
112
|
-
.off('resize' + eventNamespace, module.event.resize)
|
113
|
-
;
|
114
|
-
$scroll
|
115
|
-
.off('scrollchange' + eventNamespace, module.event.scrollchange)
|
116
|
-
;
|
117
|
-
$module.removeData(moduleNamespace);
|
118
|
-
},
|
129
|
+
determineContainer: function () {
|
130
|
+
if (settings.container) {
|
131
|
+
$container = [window, document].indexOf(settings.container) < 0 ? $document.find(settings.container) : $(settings.container);
|
132
|
+
} else {
|
133
|
+
$container = $module.offsetParent();
|
134
|
+
}
|
135
|
+
},
|
119
136
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
subtree : true
|
131
|
-
});
|
132
|
-
observer.observe($context[0], {
|
133
|
-
childList : true,
|
134
|
-
subtree : true
|
135
|
-
});
|
136
|
-
module.debug('Setting up mutation observer', observer);
|
137
|
-
}
|
138
|
-
},
|
137
|
+
determineContext: function () {
|
138
|
+
if (settings.context) {
|
139
|
+
$context = [window, document].indexOf(settings.context) < 0 ? $document.find(settings.context) : $(settings.context);
|
140
|
+
} else {
|
141
|
+
$context = $container;
|
142
|
+
}
|
143
|
+
if ($context.length === 0) {
|
144
|
+
module.error(error.invalidContext, settings.context, $module);
|
145
|
+
}
|
146
|
+
},
|
139
147
|
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
+
checkErrors: function () {
|
149
|
+
if (module.is.hidden()) {
|
150
|
+
module.error(error.visible, $module);
|
151
|
+
}
|
152
|
+
if (module.cache.element.height > module.cache.context.height) {
|
153
|
+
module.reset();
|
154
|
+
module.error(error.elementSize, $module);
|
155
|
+
}
|
156
|
+
},
|
148
157
|
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
158
|
+
bind: {
|
159
|
+
events: function () {
|
160
|
+
$window
|
161
|
+
.on('load' + eventNamespace, module.event.load)
|
162
|
+
.on('resize' + eventNamespace, module.event.resize)
|
163
|
+
;
|
164
|
+
// pub/sub pattern
|
165
|
+
$scroll
|
166
|
+
.off('scroll' + eventNamespace)
|
167
|
+
.on('scroll' + eventNamespace, module.event.scroll)
|
168
|
+
.on('scrollchange' + eventNamespace, module.event.scrollchange)
|
169
|
+
;
|
170
|
+
},
|
171
|
+
},
|
160
172
|
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
173
|
+
event: {
|
174
|
+
changed: function (mutations) {
|
175
|
+
clearTimeout(module.timer);
|
176
|
+
module.timer = setTimeout(function () {
|
177
|
+
module.verbose('DOM tree modified, updating sticky menu', mutations);
|
178
|
+
module.refresh();
|
179
|
+
}, 100);
|
180
|
+
},
|
181
|
+
documentChanged: function (mutations) {
|
182
|
+
[].forEach.call(mutations, function (mutation) {
|
183
|
+
if (mutation.removedNodes) {
|
184
|
+
[].forEach.call(mutation.removedNodes, function (node) {
|
185
|
+
if (node === element || $(node).find(element).length > 0) {
|
186
|
+
module.debug('Element removed from DOM, tearing down events');
|
187
|
+
module.destroy();
|
188
|
+
}
|
189
|
+
});
|
190
|
+
}
|
191
|
+
});
|
192
|
+
},
|
193
|
+
load: function () {
|
194
|
+
module.verbose('Page contents finished loading');
|
195
|
+
requestAnimationFrame(module.refresh);
|
196
|
+
},
|
197
|
+
resize: function () {
|
198
|
+
module.verbose('Window resized');
|
199
|
+
requestAnimationFrame(module.refresh);
|
200
|
+
},
|
201
|
+
scroll: function () {
|
202
|
+
requestAnimationFrame(function () {
|
203
|
+
$scroll.triggerHandler('scrollchange' + eventNamespace, $scroll.scrollTop());
|
204
|
+
});
|
205
|
+
},
|
206
|
+
scrollchange: function (event, scrollPosition) {
|
207
|
+
module.stick(scrollPosition);
|
208
|
+
settings.onScroll.call(element);
|
209
|
+
},
|
210
|
+
},
|
170
211
|
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
}
|
184
|
-
},
|
212
|
+
refresh: function (hardRefresh) {
|
213
|
+
module.reset();
|
214
|
+
if (!settings.context) {
|
215
|
+
module.determineContext();
|
216
|
+
}
|
217
|
+
if (hardRefresh) {
|
218
|
+
module.determineContainer();
|
219
|
+
}
|
220
|
+
module.save.positions();
|
221
|
+
module.stick();
|
222
|
+
settings.onReposition.call(element);
|
223
|
+
},
|
185
224
|
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
}, 100);
|
193
|
-
},
|
194
|
-
documentChanged: function(mutations) {
|
195
|
-
[].forEach.call(mutations, function(mutation) {
|
196
|
-
if(mutation.removedNodes) {
|
197
|
-
[].forEach.call(mutation.removedNodes, function(node) {
|
198
|
-
if(node == element || $(node).find(element).length > 0) {
|
199
|
-
module.debug('Element removed from DOM, tearing down events');
|
200
|
-
module.destroy();
|
201
|
-
}
|
202
|
-
});
|
203
|
-
}
|
204
|
-
});
|
205
|
-
},
|
206
|
-
load: function() {
|
207
|
-
module.verbose('Page contents finished loading');
|
208
|
-
requestAnimationFrame(module.refresh);
|
209
|
-
},
|
210
|
-
resize: function() {
|
211
|
-
module.verbose('Window resized');
|
212
|
-
requestAnimationFrame(module.refresh);
|
213
|
-
},
|
214
|
-
scroll: function() {
|
215
|
-
requestAnimationFrame(function() {
|
216
|
-
$scroll.triggerHandler('scrollchange' + eventNamespace, $scroll.scrollTop() );
|
217
|
-
});
|
218
|
-
},
|
219
|
-
scrollchange: function(event, scrollPosition) {
|
220
|
-
module.stick(scrollPosition);
|
221
|
-
settings.onScroll.call(element);
|
222
|
-
}
|
223
|
-
},
|
225
|
+
supports: {
|
226
|
+
sticky: function () {
|
227
|
+
var
|
228
|
+
$element = $('<div/>')
|
229
|
+
;
|
230
|
+
$element.addClass(className.supported);
|
224
231
|
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
module.determineContext();
|
229
|
-
}
|
230
|
-
if(hardRefresh) {
|
231
|
-
module.determineContainer();
|
232
|
-
}
|
233
|
-
module.save.positions();
|
234
|
-
module.stick();
|
235
|
-
settings.onReposition.call(element);
|
236
|
-
},
|
232
|
+
return $element.css('position').match('sticky');
|
233
|
+
},
|
234
|
+
},
|
237
235
|
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
236
|
+
save: {
|
237
|
+
lastScroll: function (scroll) {
|
238
|
+
module.lastScroll = scroll;
|
239
|
+
},
|
240
|
+
elementScroll: function (scroll) {
|
241
|
+
module.elementScroll = scroll;
|
242
|
+
},
|
243
|
+
positions: function () {
|
244
|
+
var
|
245
|
+
scrollContext = {
|
246
|
+
height: $scroll.height(),
|
247
|
+
},
|
248
|
+
element = {
|
249
|
+
margin: {
|
250
|
+
top: parseInt($module.css('margin-top'), 10),
|
251
|
+
bottom: parseInt($module.css('margin-bottom'), 10),
|
252
|
+
},
|
253
|
+
offset: $module.offset(),
|
254
|
+
width: $module.outerWidth(),
|
255
|
+
height: $module.outerHeight(),
|
256
|
+
},
|
257
|
+
context = {
|
258
|
+
offset: $context.offset(),
|
259
|
+
height: $context.outerHeight(),
|
260
|
+
}
|
261
|
+
;
|
262
|
+
if (!module.is.standardScroll()) {
|
263
|
+
module.debug('Non-standard scroll. Removing scroll offset from element offset');
|
264
|
+
|
265
|
+
scrollContext.top = $scroll.scrollTop();
|
266
|
+
scrollContext.left = $scroll.scrollLeft();
|
267
|
+
|
268
|
+
element.offset.top += scrollContext.top;
|
269
|
+
context.offset.top += scrollContext.top;
|
270
|
+
element.offset.left += scrollContext.left;
|
271
|
+
context.offset.left += scrollContext.left;
|
272
|
+
}
|
273
|
+
module.cache = {
|
274
|
+
fits: (element.height + settings.offset) <= scrollContext.height,
|
275
|
+
sameHeight: element.height === context.height,
|
276
|
+
scrollContext: {
|
277
|
+
height: scrollContext.height,
|
278
|
+
},
|
279
|
+
element: {
|
280
|
+
margin: element.margin,
|
281
|
+
top: element.offset.top - element.margin.top,
|
282
|
+
left: element.offset.left,
|
283
|
+
width: element.width,
|
284
|
+
height: element.height,
|
285
|
+
bottom: element.offset.top + element.height,
|
286
|
+
},
|
287
|
+
context: {
|
288
|
+
top: context.offset.top,
|
289
|
+
height: context.height,
|
290
|
+
bottom: context.offset.top + context.height,
|
291
|
+
},
|
292
|
+
};
|
293
|
+
module.set.containerSize();
|
294
|
+
|
295
|
+
module.stick();
|
296
|
+
module.debug('Caching element positions', module.cache);
|
297
|
+
},
|
298
|
+
},
|
247
299
|
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
300
|
+
get: {
|
301
|
+
direction: function (scroll) {
|
302
|
+
var
|
303
|
+
direction = 'down'
|
304
|
+
;
|
305
|
+
scroll = scroll || $scroll.scrollTop();
|
306
|
+
if (module.lastScroll && module.lastScroll > scroll) {
|
307
|
+
direction = 'up';
|
308
|
+
}
|
309
|
+
|
310
|
+
return direction;
|
311
|
+
},
|
312
|
+
scrollChange: function (scroll) {
|
313
|
+
scroll = scroll || $scroll.scrollTop();
|
314
|
+
|
315
|
+
return module.lastScroll
|
316
|
+
? scroll - module.lastScroll
|
317
|
+
: 0;
|
318
|
+
},
|
319
|
+
currentElementScroll: function () {
|
320
|
+
if (module.elementScroll) {
|
321
|
+
return module.elementScroll;
|
322
|
+
}
|
323
|
+
|
324
|
+
return module.is.top()
|
325
|
+
? Math.abs(parseInt($module.css('top'), 10)) || 0
|
326
|
+
: Math.abs(parseInt($module.css('bottom'), 10)) || 0;
|
327
|
+
},
|
328
|
+
|
329
|
+
elementScroll: function (scroll) {
|
330
|
+
scroll = scroll || $scroll.scrollTop();
|
331
|
+
var
|
332
|
+
element = module.cache.element,
|
333
|
+
scrollContext = module.cache.scrollContext,
|
334
|
+
delta = module.get.scrollChange(scroll),
|
335
|
+
maxScroll = element.height - scrollContext.height + settings.offset,
|
336
|
+
elementScroll = module.get.currentElementScroll(),
|
337
|
+
possibleScroll = elementScroll + delta
|
338
|
+
;
|
339
|
+
if (module.cache.fits || possibleScroll < 0) {
|
340
|
+
elementScroll = 0;
|
341
|
+
} else if (possibleScroll > maxScroll) {
|
342
|
+
elementScroll = maxScroll;
|
343
|
+
} else {
|
344
|
+
elementScroll = possibleScroll;
|
345
|
+
}
|
346
|
+
|
347
|
+
return elementScroll;
|
348
|
+
},
|
349
|
+
},
|
276
350
|
|
277
|
-
|
278
|
-
|
351
|
+
remove: {
|
352
|
+
lastScroll: function () {
|
353
|
+
delete module.lastScroll;
|
354
|
+
},
|
355
|
+
elementScroll: function () {
|
356
|
+
delete module.elementScroll;
|
357
|
+
},
|
358
|
+
minimumSize: function () {
|
359
|
+
$container
|
360
|
+
.css('min-height', '')
|
361
|
+
;
|
362
|
+
},
|
363
|
+
offset: function () {
|
364
|
+
$module.css('margin-top', '');
|
365
|
+
},
|
366
|
+
},
|
279
367
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
368
|
+
set: {
|
369
|
+
offset: function () {
|
370
|
+
module.verbose('Setting offset on element', settings.offset);
|
371
|
+
$module
|
372
|
+
.css('margin-top', settings.offset)
|
373
|
+
;
|
374
|
+
},
|
375
|
+
containerSize: function () {
|
376
|
+
var
|
377
|
+
tagName = $container[0].tagName
|
378
|
+
;
|
379
|
+
if (tagName === 'HTML' || tagName === 'body') {
|
380
|
+
module.determineContainer();
|
381
|
+
} else {
|
382
|
+
var tallestHeight = Math.max(module.cache.context.height, module.cache.element.height);
|
383
|
+
if (tallestHeight - $container.outerHeight() > settings.jitter) {
|
384
|
+
module.debug('Context is taller than container. Specifying exact height for container', module.cache.context.height);
|
385
|
+
$container.css({
|
386
|
+
height: tallestHeight,
|
387
|
+
});
|
388
|
+
} else {
|
389
|
+
$container.css({
|
390
|
+
height: '',
|
391
|
+
});
|
392
|
+
}
|
393
|
+
if (Math.abs($container.outerHeight() - module.cache.context.height) > settings.jitter) {
|
394
|
+
module.debug('Context has padding, specifying exact height for container', module.cache.context.height);
|
395
|
+
$container.css({
|
396
|
+
height: module.cache.context.height,
|
397
|
+
});
|
398
|
+
}
|
399
|
+
}
|
400
|
+
},
|
401
|
+
minimumSize: function () {
|
402
|
+
var
|
403
|
+
element = module.cache.element
|
404
|
+
;
|
405
|
+
$container
|
406
|
+
.css('min-height', element.height)
|
407
|
+
;
|
408
|
+
},
|
409
|
+
scroll: function (scroll) {
|
410
|
+
module.debug('Setting scroll on element', scroll);
|
411
|
+
if (module.elementScroll === scroll) {
|
412
|
+
return;
|
413
|
+
}
|
414
|
+
if (module.is.top()) {
|
415
|
+
$module
|
416
|
+
.css('bottom', '')
|
417
|
+
.css('top', -scroll + 'px')
|
418
|
+
;
|
419
|
+
}
|
420
|
+
if (module.is.bottom()) {
|
421
|
+
$module
|
422
|
+
.css('top', '')
|
423
|
+
.css('bottom', scroll + 'px')
|
424
|
+
;
|
425
|
+
}
|
426
|
+
},
|
427
|
+
size: function () {
|
428
|
+
if (module.cache.element.height !== 0 && module.cache.element.width !== 0) {
|
429
|
+
element.style.setProperty('width', module.cache.element.width + 'px', 'important');
|
430
|
+
element.style.setProperty('height', module.cache.element.height + 'px', 'important');
|
431
|
+
}
|
432
|
+
},
|
433
|
+
},
|
306
434
|
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
435
|
+
is: {
|
436
|
+
standardScroll: function () {
|
437
|
+
return $scroll[0] === window;
|
438
|
+
},
|
439
|
+
top: function () {
|
440
|
+
return $module.hasClass(className.top);
|
441
|
+
},
|
442
|
+
bottom: function () {
|
443
|
+
return $module.hasClass(className.bottom);
|
444
|
+
},
|
445
|
+
initialPosition: function () {
|
446
|
+
return !module.is.fixed() && !module.is.bound();
|
447
|
+
},
|
448
|
+
hidden: function () {
|
449
|
+
return !$module.is(':visible');
|
450
|
+
},
|
451
|
+
bound: function () {
|
452
|
+
return $module.hasClass(className.bound);
|
453
|
+
},
|
454
|
+
fixed: function () {
|
455
|
+
return $module.hasClass(className.fixed);
|
456
|
+
},
|
457
|
+
},
|
311
458
|
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
459
|
+
stick: function (scrollPosition) {
|
460
|
+
var
|
461
|
+
cachedPosition = scrollPosition || $scroll.scrollTop(),
|
462
|
+
cache = module.cache,
|
463
|
+
fits = cache.fits,
|
464
|
+
sameHeight = cache.sameHeight,
|
465
|
+
element = cache.element,
|
466
|
+
scrollContext = cache.scrollContext,
|
467
|
+
context = cache.context,
|
468
|
+
offset = module.is.bottom() && settings.pushing
|
469
|
+
? settings.bottomOffset
|
470
|
+
: settings.offset,
|
471
|
+
scroll = {
|
472
|
+
top: cachedPosition + offset,
|
473
|
+
bottom: cachedPosition + offset + scrollContext.height,
|
474
|
+
},
|
475
|
+
elementScroll = fits
|
476
|
+
? 0
|
477
|
+
: module.get.elementScroll(scroll.top),
|
478
|
+
|
479
|
+
// shorthand
|
480
|
+
doesntFit = !fits,
|
481
|
+
elementVisible = element.height !== 0
|
482
|
+
;
|
483
|
+
if (elementVisible && !sameHeight) {
|
484
|
+
if (module.is.initialPosition()) {
|
485
|
+
if (scroll.top >= context.bottom) {
|
486
|
+
module.debug('Initial element position is bottom of container');
|
487
|
+
module.bindBottom();
|
488
|
+
} else if (scroll.top > element.top) {
|
489
|
+
if ((element.height + scroll.top - elementScroll) >= context.bottom && element.height < context.height) {
|
490
|
+
module.debug('Initial element position is bottom of container');
|
491
|
+
module.bindBottom();
|
492
|
+
} else {
|
493
|
+
module.debug('Initial element position is fixed');
|
494
|
+
module.fixTop();
|
495
|
+
}
|
496
|
+
}
|
497
|
+
} else if (module.is.fixed()) {
|
498
|
+
if (module.is.top()) {
|
499
|
+
if (scroll.top <= element.top) {
|
500
|
+
module.debug('Fixed element reached top of container');
|
501
|
+
module.setInitialPosition();
|
502
|
+
} else if ((element.height + scroll.top - elementScroll) >= context.bottom) {
|
503
|
+
module.debug('Fixed element reached bottom of container');
|
504
|
+
module.bindBottom();
|
505
|
+
} else if (doesntFit) { // scroll element if larger than screen
|
506
|
+
module.set.scroll(elementScroll);
|
507
|
+
module.save.lastScroll(scroll.top);
|
508
|
+
module.save.elementScroll(elementScroll);
|
509
|
+
}
|
510
|
+
} else if (module.is.bottom()) {
|
511
|
+
if ((scroll.bottom - element.height) <= element.top) { // top edge
|
512
|
+
module.debug('Bottom fixed rail has reached top of container');
|
513
|
+
module.setInitialPosition();
|
514
|
+
} else if (scroll.bottom >= context.bottom) { // bottom edge
|
515
|
+
module.debug('Bottom fixed rail has reached bottom of container');
|
516
|
+
module.bindBottom();
|
517
|
+
} else if (doesntFit) { // scroll element if larger than screen
|
518
|
+
module.set.scroll(elementScroll);
|
519
|
+
module.save.lastScroll(scroll.top);
|
520
|
+
module.save.elementScroll(elementScroll);
|
521
|
+
}
|
522
|
+
}
|
523
|
+
} else if (module.is.bottom()) {
|
524
|
+
if (scroll.top <= element.top) {
|
525
|
+
module.debug('Jumped from bottom fixed to top fixed, most likely used home/end button');
|
526
|
+
module.setInitialPosition();
|
527
|
+
} else {
|
528
|
+
if (settings.pushing) {
|
529
|
+
if (module.is.bound() && scroll.bottom <= context.bottom) {
|
530
|
+
module.debug('Fixing bottom attached element to bottom of browser.');
|
531
|
+
module.fixBottom();
|
532
|
+
}
|
533
|
+
} else {
|
534
|
+
if (module.is.bound() && (scroll.top <= context.bottom - element.height)) {
|
535
|
+
module.debug('Fixing bottom attached element to top of browser.');
|
536
|
+
module.fixTop();
|
537
|
+
}
|
538
|
+
}
|
539
|
+
}
|
540
|
+
}
|
541
|
+
}
|
542
|
+
},
|
339
543
|
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
544
|
+
bindTop: function () {
|
545
|
+
module.debug('Binding element to top of parent container');
|
546
|
+
module.remove.offset();
|
547
|
+
if (settings.setSize) {
|
548
|
+
module.set.size();
|
549
|
+
}
|
550
|
+
$module
|
551
|
+
.css({
|
552
|
+
left: '',
|
553
|
+
top: '',
|
554
|
+
marginBottom: '',
|
555
|
+
})
|
556
|
+
.removeClass(className.fixed)
|
557
|
+
.removeClass(className.bottom)
|
558
|
+
.addClass(className.bound)
|
559
|
+
.addClass(className.top)
|
560
|
+
;
|
561
|
+
settings.onTop.call(element);
|
562
|
+
settings.onUnstick.call(element);
|
563
|
+
},
|
564
|
+
bindBottom: function () {
|
565
|
+
module.debug('Binding element to bottom of parent container');
|
566
|
+
module.remove.offset();
|
567
|
+
if (settings.setSize) {
|
568
|
+
module.set.size();
|
569
|
+
}
|
570
|
+
$module
|
571
|
+
.css({
|
572
|
+
left: '',
|
573
|
+
top: '',
|
574
|
+
})
|
575
|
+
.removeClass(className.fixed)
|
576
|
+
.removeClass(className.top)
|
577
|
+
.addClass(className.bound)
|
578
|
+
.addClass(className.bottom)
|
579
|
+
;
|
580
|
+
settings.onBottom.call(element);
|
581
|
+
settings.onUnstick.call(element);
|
582
|
+
},
|
362
583
|
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
delete module.elementScroll;
|
369
|
-
},
|
370
|
-
minimumSize: function() {
|
371
|
-
$container
|
372
|
-
.css('min-height', '')
|
373
|
-
;
|
374
|
-
},
|
375
|
-
offset: function() {
|
376
|
-
$module.css('margin-top', '');
|
377
|
-
}
|
378
|
-
},
|
584
|
+
setInitialPosition: function () {
|
585
|
+
module.debug('Returning to initial position');
|
586
|
+
module.unfix();
|
587
|
+
module.unbind();
|
588
|
+
},
|
379
589
|
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
$container.css({
|
401
|
-
height: tallestHeight,
|
402
|
-
});
|
403
|
-
}
|
404
|
-
else {
|
405
|
-
$container.css({
|
406
|
-
height: '',
|
407
|
-
});
|
408
|
-
}
|
409
|
-
if( Math.abs($container.outerHeight() - module.cache.context.height) > settings.jitter) {
|
410
|
-
module.debug('Context has padding, specifying exact height for container', module.cache.context.height);
|
411
|
-
$container.css({
|
412
|
-
height: module.cache.context.height
|
413
|
-
});
|
414
|
-
}
|
415
|
-
}
|
416
|
-
},
|
417
|
-
minimumSize: function() {
|
418
|
-
var
|
419
|
-
element = module.cache.element
|
420
|
-
;
|
421
|
-
$container
|
422
|
-
.css('min-height', element.height)
|
423
|
-
;
|
424
|
-
},
|
425
|
-
scroll: function(scroll) {
|
426
|
-
module.debug('Setting scroll on element', scroll);
|
427
|
-
if(module.elementScroll == scroll) {
|
428
|
-
return;
|
429
|
-
}
|
430
|
-
if( module.is.top() ) {
|
431
|
-
$module
|
432
|
-
.css('bottom', '')
|
433
|
-
.css('top', -scroll)
|
434
|
-
;
|
435
|
-
}
|
436
|
-
if( module.is.bottom() ) {
|
437
|
-
$module
|
438
|
-
.css('top', '')
|
439
|
-
.css('bottom', scroll)
|
440
|
-
;
|
441
|
-
}
|
442
|
-
},
|
443
|
-
size: function() {
|
444
|
-
if(module.cache.element.height !== 0 && module.cache.element.width !== 0) {
|
445
|
-
element.style.setProperty('width', module.cache.element.width + 'px', 'important');
|
446
|
-
element.style.setProperty('height', module.cache.element.height + 'px', 'important');
|
447
|
-
}
|
448
|
-
}
|
449
|
-
},
|
590
|
+
fixTop: function () {
|
591
|
+
module.debug('Fixing element to top of page');
|
592
|
+
if (settings.setSize) {
|
593
|
+
module.set.size();
|
594
|
+
}
|
595
|
+
module.set.minimumSize();
|
596
|
+
module.set.offset();
|
597
|
+
$module
|
598
|
+
.css({
|
599
|
+
left: module.cache.element.left,
|
600
|
+
bottom: '',
|
601
|
+
marginBottom: '',
|
602
|
+
})
|
603
|
+
.removeClass(className.bound)
|
604
|
+
.removeClass(className.bottom)
|
605
|
+
.addClass(className.fixed)
|
606
|
+
.addClass(className.top)
|
607
|
+
;
|
608
|
+
settings.onStick.call(element);
|
609
|
+
},
|
450
610
|
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
return $module.hasClass(className.fixed);
|
472
|
-
}
|
473
|
-
},
|
611
|
+
fixBottom: function () {
|
612
|
+
module.debug('Sticking element to bottom of page');
|
613
|
+
if (settings.setSize) {
|
614
|
+
module.set.size();
|
615
|
+
}
|
616
|
+
module.set.minimumSize();
|
617
|
+
module.set.offset();
|
618
|
+
$module
|
619
|
+
.css({
|
620
|
+
left: module.cache.element.left,
|
621
|
+
bottom: '',
|
622
|
+
marginBottom: '',
|
623
|
+
})
|
624
|
+
.removeClass(className.bound)
|
625
|
+
.removeClass(className.top)
|
626
|
+
.addClass(className.fixed)
|
627
|
+
.addClass(className.bottom)
|
628
|
+
;
|
629
|
+
settings.onStick.call(element);
|
630
|
+
},
|
474
631
|
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
: settings.offset,
|
487
|
-
scroll = {
|
488
|
-
top : cachedPosition + offset,
|
489
|
-
bottom : cachedPosition + offset + scrollContext.height
|
490
|
-
},
|
491
|
-
elementScroll = (fits)
|
492
|
-
? 0
|
493
|
-
: module.get.elementScroll(scroll.top),
|
494
|
-
|
495
|
-
// shorthand
|
496
|
-
doesntFit = !fits,
|
497
|
-
elementVisible = (element.height !== 0)
|
498
|
-
;
|
499
|
-
if(elementVisible && !sameHeight) {
|
500
|
-
|
501
|
-
if( module.is.initialPosition() ) {
|
502
|
-
if(scroll.top >= context.bottom) {
|
503
|
-
module.debug('Initial element position is bottom of container');
|
504
|
-
module.bindBottom();
|
505
|
-
}
|
506
|
-
else if(scroll.top > element.top) {
|
507
|
-
if( (element.height + scroll.top - elementScroll) >= context.bottom && element.height < context.height) {
|
508
|
-
module.debug('Initial element position is bottom of container');
|
509
|
-
module.bindBottom();
|
510
|
-
}
|
511
|
-
else {
|
512
|
-
module.debug('Initial element position is fixed');
|
513
|
-
module.fixTop();
|
514
|
-
}
|
515
|
-
}
|
632
|
+
unbind: function () {
|
633
|
+
if (module.is.bound()) {
|
634
|
+
module.debug('Removing container bound position on element');
|
635
|
+
module.remove.offset();
|
636
|
+
$module
|
637
|
+
.removeClass(className.bound)
|
638
|
+
.removeClass(className.top)
|
639
|
+
.removeClass(className.bottom)
|
640
|
+
;
|
641
|
+
}
|
642
|
+
},
|
516
643
|
|
517
|
-
|
518
|
-
|
644
|
+
unfix: function () {
|
645
|
+
if (module.is.fixed()) {
|
646
|
+
module.debug('Removing fixed position on element');
|
647
|
+
module.remove.minimumSize();
|
648
|
+
module.remove.offset();
|
649
|
+
$module
|
650
|
+
.removeClass(className.fixed)
|
651
|
+
.removeClass(className.top)
|
652
|
+
.removeClass(className.bottom)
|
653
|
+
;
|
654
|
+
settings.onUnstick.call(element);
|
655
|
+
}
|
656
|
+
},
|
519
657
|
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
module.bindBottom();
|
529
|
-
}
|
530
|
-
// scroll element if larger than screen
|
531
|
-
else if(doesntFit) {
|
532
|
-
module.set.scroll(elementScroll);
|
533
|
-
module.save.lastScroll(scroll.top);
|
534
|
-
module.save.elementScroll(elementScroll);
|
535
|
-
}
|
536
|
-
}
|
658
|
+
reset: function () {
|
659
|
+
module.debug('Resetting elements position');
|
660
|
+
module.unbind();
|
661
|
+
module.unfix();
|
662
|
+
module.resetCSS();
|
663
|
+
module.remove.offset();
|
664
|
+
module.remove.lastScroll();
|
665
|
+
},
|
537
666
|
|
538
|
-
|
539
|
-
|
667
|
+
resetCSS: function () {
|
668
|
+
$module
|
669
|
+
.css({
|
670
|
+
width: '',
|
671
|
+
height: '',
|
672
|
+
})
|
673
|
+
;
|
674
|
+
$container
|
675
|
+
.css({
|
676
|
+
height: '',
|
677
|
+
})
|
678
|
+
;
|
679
|
+
},
|
540
680
|
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
681
|
+
setting: function (name, value) {
|
682
|
+
if ($.isPlainObject(name)) {
|
683
|
+
$.extend(true, settings, name);
|
684
|
+
} else if (value !== undefined) {
|
685
|
+
settings[name] = value;
|
686
|
+
} else {
|
687
|
+
return settings[name];
|
688
|
+
}
|
689
|
+
},
|
690
|
+
internal: function (name, value) {
|
691
|
+
if ($.isPlainObject(name)) {
|
692
|
+
$.extend(true, module, name);
|
693
|
+
} else if (value !== undefined) {
|
694
|
+
module[name] = value;
|
695
|
+
} else {
|
696
|
+
return module[name];
|
697
|
+
}
|
698
|
+
},
|
699
|
+
debug: function () {
|
700
|
+
if (!settings.silent && settings.debug) {
|
701
|
+
if (settings.performance) {
|
702
|
+
module.performance.log(arguments);
|
703
|
+
} else {
|
704
|
+
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
705
|
+
module.debug.apply(console, arguments);
|
706
|
+
}
|
707
|
+
}
|
708
|
+
},
|
709
|
+
verbose: function () {
|
710
|
+
if (!settings.silent && settings.verbose && settings.debug) {
|
711
|
+
if (settings.performance) {
|
712
|
+
module.performance.log(arguments);
|
713
|
+
} else {
|
714
|
+
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
715
|
+
module.verbose.apply(console, arguments);
|
716
|
+
}
|
717
|
+
}
|
718
|
+
},
|
719
|
+
error: function () {
|
720
|
+
if (!settings.silent) {
|
721
|
+
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
722
|
+
module.error.apply(console, arguments);
|
723
|
+
}
|
724
|
+
},
|
725
|
+
performance: {
|
726
|
+
log: function (message) {
|
727
|
+
var
|
728
|
+
currentTime,
|
729
|
+
executionTime,
|
730
|
+
previousTime
|
731
|
+
;
|
732
|
+
if (settings.performance) {
|
733
|
+
currentTime = Date.now();
|
734
|
+
previousTime = time || currentTime;
|
735
|
+
executionTime = currentTime - previousTime;
|
736
|
+
time = currentTime;
|
737
|
+
performance.push({
|
738
|
+
Name: message[0],
|
739
|
+
Arguments: [].slice.call(message, 1) || '',
|
740
|
+
Element: element,
|
741
|
+
'Execution Time': executionTime,
|
742
|
+
});
|
743
|
+
}
|
744
|
+
clearTimeout(module.performance.timer);
|
745
|
+
module.performance.timer = setTimeout(module.performance.display, 0);
|
746
|
+
},
|
747
|
+
display: function () {
|
748
|
+
var
|
749
|
+
title = settings.name + ':',
|
750
|
+
totalTime = 0
|
751
|
+
;
|
752
|
+
time = false;
|
753
|
+
clearTimeout(module.performance.timer);
|
754
|
+
$.each(performance, function (index, data) {
|
755
|
+
totalTime += data['Execution Time'];
|
756
|
+
});
|
757
|
+
title += ' ' + totalTime + 'ms';
|
758
|
+
if (moduleSelector) {
|
759
|
+
title += ' \'' + moduleSelector + '\'';
|
760
|
+
}
|
761
|
+
if (performance.length > 0) {
|
762
|
+
console.groupCollapsed(title);
|
763
|
+
if (console.table) {
|
764
|
+
console.table(performance);
|
765
|
+
} else {
|
766
|
+
$.each(performance, function (index, data) {
|
767
|
+
console.log(data.Name + ': ' + data['Execution Time'] + 'ms');
|
768
|
+
});
|
769
|
+
}
|
770
|
+
console.groupEnd();
|
771
|
+
}
|
772
|
+
performance = [];
|
773
|
+
},
|
774
|
+
},
|
775
|
+
invoke: function (query, passedArguments, context) {
|
776
|
+
var
|
777
|
+
object = instance,
|
778
|
+
maxDepth,
|
779
|
+
found,
|
780
|
+
response
|
781
|
+
;
|
782
|
+
passedArguments = passedArguments || queryArguments;
|
783
|
+
context = context || element;
|
784
|
+
if (typeof query === 'string' && object !== undefined) {
|
785
|
+
query = query.split(/[ .]/);
|
786
|
+
maxDepth = query.length - 1;
|
787
|
+
$.each(query, function (depth, value) {
|
788
|
+
var camelCaseValue = depth !== maxDepth
|
789
|
+
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
790
|
+
: query
|
791
|
+
;
|
792
|
+
if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
|
793
|
+
object = object[camelCaseValue];
|
794
|
+
} else if (object[camelCaseValue] !== undefined) {
|
795
|
+
found = object[camelCaseValue];
|
796
|
+
|
797
|
+
return false;
|
798
|
+
} else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
|
799
|
+
object = object[value];
|
800
|
+
} else if (object[value] !== undefined) {
|
801
|
+
found = object[value];
|
802
|
+
|
803
|
+
return false;
|
804
|
+
} else {
|
805
|
+
module.error(error.method, query);
|
806
|
+
|
807
|
+
return false;
|
808
|
+
}
|
809
|
+
});
|
810
|
+
}
|
811
|
+
if (isFunction(found)) {
|
812
|
+
response = found.apply(context, passedArguments);
|
813
|
+
} else if (found !== undefined) {
|
814
|
+
response = found;
|
815
|
+
}
|
816
|
+
if (Array.isArray(returnedValue)) {
|
817
|
+
returnedValue.push(response);
|
818
|
+
} else if (returnedValue !== undefined) {
|
819
|
+
returnedValue = [returnedValue, response];
|
820
|
+
} else if (response !== undefined) {
|
821
|
+
returnedValue = response;
|
822
|
+
}
|
823
|
+
|
824
|
+
return found;
|
825
|
+
},
|
826
|
+
};
|
557
827
|
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
if( scroll.top <= element.top ) {
|
562
|
-
module.debug('Jumped from bottom fixed to top fixed, most likely used home/end button');
|
563
|
-
module.setInitialPosition();
|
564
|
-
}
|
565
|
-
else {
|
566
|
-
if(settings.pushing) {
|
567
|
-
if(module.is.bound() && scroll.bottom <= context.bottom ) {
|
568
|
-
module.debug('Fixing bottom attached element to bottom of browser.');
|
569
|
-
module.fixBottom();
|
570
|
-
}
|
828
|
+
if (methodInvoked) {
|
829
|
+
if (instance === undefined) {
|
830
|
+
module.initialize();
|
571
831
|
}
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
}
|
832
|
+
module.invoke(query);
|
833
|
+
} else {
|
834
|
+
if (instance !== undefined) {
|
835
|
+
instance.invoke('destroy');
|
577
836
|
}
|
578
|
-
|
837
|
+
module.initialize();
|
579
838
|
}
|
580
|
-
|
581
|
-
},
|
839
|
+
});
|
582
840
|
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
module.set.size();
|
588
|
-
}
|
589
|
-
$module
|
590
|
-
.css({
|
591
|
-
left : '',
|
592
|
-
top : '',
|
593
|
-
marginBottom : ''
|
594
|
-
})
|
595
|
-
.removeClass(className.fixed)
|
596
|
-
.removeClass(className.bottom)
|
597
|
-
.addClass(className.bound)
|
598
|
-
.addClass(className.top)
|
599
|
-
;
|
600
|
-
settings.onTop.call(element);
|
601
|
-
settings.onUnstick.call(element);
|
602
|
-
},
|
603
|
-
bindBottom: function() {
|
604
|
-
module.debug('Binding element to bottom of parent container');
|
605
|
-
module.remove.offset();
|
606
|
-
if(settings.setSize) {
|
607
|
-
module.set.size();
|
608
|
-
}
|
609
|
-
$module
|
610
|
-
.css({
|
611
|
-
left : '',
|
612
|
-
top : ''
|
613
|
-
})
|
614
|
-
.removeClass(className.fixed)
|
615
|
-
.removeClass(className.top)
|
616
|
-
.addClass(className.bound)
|
617
|
-
.addClass(className.bottom)
|
618
|
-
;
|
619
|
-
settings.onBottom.call(element);
|
620
|
-
settings.onUnstick.call(element);
|
621
|
-
},
|
841
|
+
return returnedValue !== undefined
|
842
|
+
? returnedValue
|
843
|
+
: this;
|
844
|
+
};
|
622
845
|
|
623
|
-
|
624
|
-
module.debug('Returning to initial position');
|
625
|
-
module.unfix();
|
626
|
-
module.unbind();
|
627
|
-
},
|
846
|
+
$.fn.sticky.settings = {
|
628
847
|
|
848
|
+
name: 'Sticky',
|
849
|
+
namespace: 'sticky',
|
629
850
|
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
}
|
635
|
-
module.set.minimumSize();
|
636
|
-
module.set.offset();
|
637
|
-
$module
|
638
|
-
.css({
|
639
|
-
left : module.cache.element.left,
|
640
|
-
bottom : '',
|
641
|
-
marginBottom : ''
|
642
|
-
})
|
643
|
-
.removeClass(className.bound)
|
644
|
-
.removeClass(className.bottom)
|
645
|
-
.addClass(className.fixed)
|
646
|
-
.addClass(className.top)
|
647
|
-
;
|
648
|
-
settings.onStick.call(element);
|
649
|
-
},
|
851
|
+
silent: false,
|
852
|
+
debug: false,
|
853
|
+
verbose: true,
|
854
|
+
performance: true,
|
650
855
|
|
651
|
-
|
652
|
-
|
653
|
-
if(settings.setSize) {
|
654
|
-
module.set.size();
|
655
|
-
}
|
656
|
-
module.set.minimumSize();
|
657
|
-
module.set.offset();
|
658
|
-
$module
|
659
|
-
.css({
|
660
|
-
left : module.cache.element.left,
|
661
|
-
bottom : '',
|
662
|
-
marginBottom : ''
|
663
|
-
})
|
664
|
-
.removeClass(className.bound)
|
665
|
-
.removeClass(className.top)
|
666
|
-
.addClass(className.fixed)
|
667
|
-
.addClass(className.bottom)
|
668
|
-
;
|
669
|
-
settings.onStick.call(element);
|
670
|
-
},
|
856
|
+
// whether to stick in the opposite direction on scroll up
|
857
|
+
pushing: false,
|
671
858
|
|
672
|
-
|
673
|
-
|
674
|
-
module.debug('Removing container bound position on element');
|
675
|
-
module.remove.offset();
|
676
|
-
$module
|
677
|
-
.removeClass(className.bound)
|
678
|
-
.removeClass(className.top)
|
679
|
-
.removeClass(className.bottom)
|
680
|
-
;
|
681
|
-
}
|
682
|
-
},
|
859
|
+
context: false,
|
860
|
+
container: false,
|
683
861
|
|
684
|
-
|
685
|
-
|
686
|
-
module.debug('Removing fixed position on element');
|
687
|
-
module.remove.minimumSize();
|
688
|
-
module.remove.offset();
|
689
|
-
$module
|
690
|
-
.removeClass(className.fixed)
|
691
|
-
.removeClass(className.top)
|
692
|
-
.removeClass(className.bottom)
|
693
|
-
;
|
694
|
-
settings.onUnstick.call(element);
|
695
|
-
}
|
696
|
-
},
|
862
|
+
// Context to watch scroll events
|
863
|
+
scrollContext: window,
|
697
864
|
|
698
|
-
|
699
|
-
|
700
|
-
module.unbind();
|
701
|
-
module.unfix();
|
702
|
-
module.resetCSS();
|
703
|
-
module.remove.offset();
|
704
|
-
module.remove.lastScroll();
|
705
|
-
},
|
865
|
+
// Offset to adjust scroll
|
866
|
+
offset: 0,
|
706
867
|
|
707
|
-
|
708
|
-
|
709
|
-
.css({
|
710
|
-
width : '',
|
711
|
-
height : ''
|
712
|
-
})
|
713
|
-
;
|
714
|
-
$container
|
715
|
-
.css({
|
716
|
-
height: ''
|
717
|
-
})
|
718
|
-
;
|
719
|
-
},
|
868
|
+
// Offset to adjust scroll when attached to bottom of screen
|
869
|
+
bottomOffset: 0,
|
720
870
|
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
},
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
},
|
754
|
-
verbose: function() {
|
755
|
-
if(!settings.silent && settings.verbose && settings.debug) {
|
756
|
-
if(settings.performance) {
|
757
|
-
module.performance.log(arguments);
|
758
|
-
}
|
759
|
-
else {
|
760
|
-
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
|
761
|
-
module.verbose.apply(console, arguments);
|
762
|
-
}
|
763
|
-
}
|
764
|
-
},
|
765
|
-
error: function() {
|
766
|
-
if(!settings.silent) {
|
767
|
-
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
|
768
|
-
module.error.apply(console, arguments);
|
769
|
-
}
|
871
|
+
// will only set container height if difference between context and container is larger than this number
|
872
|
+
jitter: 5,
|
873
|
+
|
874
|
+
// set width of sticky element when it is fixed to page (used to make sure 100% width is maintained if no fixed size set)
|
875
|
+
setSize: true,
|
876
|
+
|
877
|
+
// Whether to automatically observe changes with Mutation Observers
|
878
|
+
observeChanges: false,
|
879
|
+
|
880
|
+
// Called when position is recalculated
|
881
|
+
onReposition: function () {},
|
882
|
+
|
883
|
+
// Called on each scroll
|
884
|
+
onScroll: function () {},
|
885
|
+
|
886
|
+
// Called when element is stuck to viewport
|
887
|
+
onStick: function () {},
|
888
|
+
|
889
|
+
// Called when element is unstuck from viewport
|
890
|
+
onUnstick: function () {},
|
891
|
+
|
892
|
+
// Called when element reaches top of context
|
893
|
+
onTop: function () {},
|
894
|
+
|
895
|
+
// Called when element reaches bottom of context
|
896
|
+
onBottom: function () {},
|
897
|
+
|
898
|
+
error: {
|
899
|
+
visible: 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.',
|
900
|
+
method: 'The method you called is not defined.',
|
901
|
+
invalidContext: 'Context specified does not exist',
|
902
|
+
elementSize: 'Sticky element is larger than its container, cannot create sticky.',
|
770
903
|
},
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
if(settings.performance) {
|
779
|
-
currentTime = new Date().getTime();
|
780
|
-
previousTime = time || currentTime;
|
781
|
-
executionTime = currentTime - previousTime;
|
782
|
-
time = currentTime;
|
783
|
-
performance.push({
|
784
|
-
'Name' : message[0],
|
785
|
-
'Arguments' : [].slice.call(message, 1) || '',
|
786
|
-
'Element' : element,
|
787
|
-
'Execution Time' : executionTime
|
788
|
-
});
|
789
|
-
}
|
790
|
-
clearTimeout(module.performance.timer);
|
791
|
-
module.performance.timer = setTimeout(module.performance.display, 0);
|
792
|
-
},
|
793
|
-
display: function() {
|
794
|
-
var
|
795
|
-
title = settings.name + ':',
|
796
|
-
totalTime = 0
|
797
|
-
;
|
798
|
-
time = false;
|
799
|
-
clearTimeout(module.performance.timer);
|
800
|
-
$.each(performance, function(index, data) {
|
801
|
-
totalTime += data['Execution Time'];
|
802
|
-
});
|
803
|
-
title += ' ' + totalTime + 'ms';
|
804
|
-
if(moduleSelector) {
|
805
|
-
title += ' \'' + moduleSelector + '\'';
|
806
|
-
}
|
807
|
-
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
|
808
|
-
console.groupCollapsed(title);
|
809
|
-
if(console.table) {
|
810
|
-
console.table(performance);
|
811
|
-
}
|
812
|
-
else {
|
813
|
-
$.each(performance, function(index, data) {
|
814
|
-
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
|
815
|
-
});
|
816
|
-
}
|
817
|
-
console.groupEnd();
|
818
|
-
}
|
819
|
-
performance = [];
|
820
|
-
}
|
904
|
+
|
905
|
+
className: {
|
906
|
+
bound: 'bound',
|
907
|
+
fixed: 'fixed',
|
908
|
+
supported: 'native',
|
909
|
+
top: 'top',
|
910
|
+
bottom: 'bottom',
|
821
911
|
},
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
maxDepth,
|
826
|
-
found,
|
827
|
-
response
|
828
|
-
;
|
829
|
-
passedArguments = passedArguments || queryArguments;
|
830
|
-
context = context || element;
|
831
|
-
if(typeof query == 'string' && object !== undefined) {
|
832
|
-
query = query.split(/[\. ]/);
|
833
|
-
maxDepth = query.length - 1;
|
834
|
-
$.each(query, function(depth, value) {
|
835
|
-
var camelCaseValue = (depth != maxDepth)
|
836
|
-
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
|
837
|
-
: query
|
838
|
-
;
|
839
|
-
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
|
840
|
-
object = object[camelCaseValue];
|
841
|
-
}
|
842
|
-
else if( object[camelCaseValue] !== undefined ) {
|
843
|
-
found = object[camelCaseValue];
|
844
|
-
return false;
|
845
|
-
}
|
846
|
-
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
|
847
|
-
object = object[value];
|
848
|
-
}
|
849
|
-
else if( object[value] !== undefined ) {
|
850
|
-
found = object[value];
|
851
|
-
return false;
|
852
|
-
}
|
853
|
-
else {
|
854
|
-
return false;
|
855
|
-
}
|
856
|
-
});
|
857
|
-
}
|
858
|
-
if ( $.isFunction( found ) ) {
|
859
|
-
response = found.apply(context, passedArguments);
|
860
|
-
}
|
861
|
-
else if(found !== undefined) {
|
862
|
-
response = found;
|
863
|
-
}
|
864
|
-
if(Array.isArray(returnedValue)) {
|
865
|
-
returnedValue.push(response);
|
866
|
-
}
|
867
|
-
else if(returnedValue !== undefined) {
|
868
|
-
returnedValue = [returnedValue, response];
|
869
|
-
}
|
870
|
-
else if(response !== undefined) {
|
871
|
-
returnedValue = response;
|
872
|
-
}
|
873
|
-
return found;
|
874
|
-
}
|
875
|
-
};
|
876
|
-
|
877
|
-
if(methodInvoked) {
|
878
|
-
if(instance === undefined) {
|
879
|
-
module.initialize();
|
880
|
-
}
|
881
|
-
module.invoke(query);
|
882
|
-
}
|
883
|
-
else {
|
884
|
-
if(instance !== undefined) {
|
885
|
-
instance.invoke('destroy');
|
886
|
-
}
|
887
|
-
module.initialize();
|
888
|
-
}
|
889
|
-
})
|
890
|
-
;
|
891
|
-
|
892
|
-
return (returnedValue !== undefined)
|
893
|
-
? returnedValue
|
894
|
-
: this
|
895
|
-
;
|
896
|
-
};
|
897
|
-
|
898
|
-
$.fn.sticky.settings = {
|
899
|
-
|
900
|
-
name : 'Sticky',
|
901
|
-
namespace : 'sticky',
|
902
|
-
|
903
|
-
silent : false,
|
904
|
-
debug : false,
|
905
|
-
verbose : true,
|
906
|
-
performance : true,
|
907
|
-
|
908
|
-
// whether to stick in the opposite direction on scroll up
|
909
|
-
pushing : false,
|
910
|
-
|
911
|
-
context : false,
|
912
|
-
container : false,
|
913
|
-
|
914
|
-
// Context to watch scroll events
|
915
|
-
scrollContext : window,
|
916
|
-
|
917
|
-
// Offset to adjust scroll
|
918
|
-
offset : 0,
|
919
|
-
|
920
|
-
// Offset to adjust scroll when attached to bottom of screen
|
921
|
-
bottomOffset : 0,
|
922
|
-
|
923
|
-
// will only set container height if difference between context and container is larger than this number
|
924
|
-
jitter : 5,
|
925
|
-
|
926
|
-
// set width of sticky element when it is fixed to page (used to make sure 100% width is maintained if no fixed size set)
|
927
|
-
setSize : true,
|
928
|
-
|
929
|
-
// Whether to automatically observe changes with Mutation Observers
|
930
|
-
observeChanges : false,
|
931
|
-
|
932
|
-
// Called when position is recalculated
|
933
|
-
onReposition : function(){},
|
934
|
-
|
935
|
-
// Called on each scroll
|
936
|
-
onScroll : function(){},
|
937
|
-
|
938
|
-
// Called when element is stuck to viewport
|
939
|
-
onStick : function(){},
|
940
|
-
|
941
|
-
// Called when element is unstuck from viewport
|
942
|
-
onUnstick : function(){},
|
943
|
-
|
944
|
-
// Called when element reaches top of context
|
945
|
-
onTop : function(){},
|
946
|
-
|
947
|
-
// Called when element reaches bottom of context
|
948
|
-
onBottom : function(){},
|
949
|
-
|
950
|
-
error : {
|
951
|
-
container : 'Sticky element must be inside a relative container',
|
952
|
-
visible : 'Element is hidden, you must call refresh after element becomes visible. Use silent setting to suppress this warning in production.',
|
953
|
-
method : 'The method you called is not defined.',
|
954
|
-
invalidContext : 'Context specified does not exist',
|
955
|
-
elementSize : 'Sticky element is larger than its container, cannot create sticky.'
|
956
|
-
},
|
957
|
-
|
958
|
-
className : {
|
959
|
-
bound : 'bound',
|
960
|
-
fixed : 'fixed',
|
961
|
-
supported : 'native',
|
962
|
-
top : 'top',
|
963
|
-
bottom : 'bottom'
|
964
|
-
}
|
965
|
-
|
966
|
-
};
|
967
|
-
|
968
|
-
})( jQuery, window, document );
|
912
|
+
|
913
|
+
};
|
914
|
+
})(jQuery, window, document);
|