@glitchr/stickyjs 1.0.35 → 1.0.36

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.
package/README.md CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glitchr/stickyjs",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "Sticky scroll library",
5
5
  "main": "src/index.js",
6
6
  "repository": {
package/src/css/index.css CHANGED
File without changes
package/src/index.js CHANGED
@@ -1,2 +1,10 @@
1
+ import $ from 'jquery';
2
+
3
+ // Modern browser: use passive event listeners where appropriate for better performance
4
+ jQuery.event.special.touchstart = { setup: function( _, ns, handle ) { this.addEventListener("touchstart", handle, { passive: !ns.includes("noPreventDefault") }); } };
5
+ jQuery.event.special.touchmove = { setup: function( _, ns, handle ) { this.addEventListener("touchmove", handle, { passive: !ns.includes("noPreventDefault") }); } };
6
+ jQuery.event.special.wheel = { setup: function( _, ns, handle ) { this.addEventListener("wheel", handle, { passive: true }); } };
7
+ jQuery.event.special.mousewheel = { setup: function( _, ns, handle ) { this.addEventListener("mousewheel", handle, { passive: true }); } };
8
+
1
9
  import './js/sticky.js';
2
10
  import './css/index.css';
package/src/js/sticky.js CHANGED
@@ -1,13 +1,7 @@
1
- // Modern browser: use passive event listeners where appropriate for better performance
2
- jQuery.event.special.touchstart = { setup: function( _, ns, handle ) { this.addEventListener("touchstart", handle, { passive: !ns.includes("noPreventDefault") }); } };
3
- jQuery.event.special.touchmove = { setup: function( _, ns, handle ) { this.addEventListener("touchmove", handle, { passive: !ns.includes("noPreventDefault") }); } };
4
- jQuery.event.special.wheel = { setup: function( _, ns, handle ) { this.addEventListener("wheel", handle, { passive: true }); } };
5
- jQuery.event.special.mousewheel = { setup: function( _, ns, handle ) { this.addEventListener("mousewheel", handle, { passive: true }); } };
6
-
7
- var replaceHashFlag = false;
8
- // Sticky.js
9
1
  (function(namespace) {
10
2
 
3
+ var replaceHashFlag = false;
4
+
11
5
  namespace.replaceHash = function(newHash, triggerHashChange = true, skipIfEmptyIdentifier = true) {
12
6
 
13
7
  replaceHashFlag = true;