@ntlab/ntjs-assets 2.0.2 → 2.0.4

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