@glitchr/stickyjs 1.0.39 → 1.0.40

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/js/sticky.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glitchr/stickyjs",
3
- "version": "1.0.39",
3
+ "version": "1.0.40",
4
4
  "description": "Sticky scroll library",
5
5
  "main": "src/index.js",
6
6
  "repository": {
package/src/js/sticky.js CHANGED
@@ -1142,16 +1142,16 @@ $.fn.serializeObject = function () {
1142
1142
  var hash = null;
1143
1143
  if(Settings.debug > 1) console.log("Sticky headlines:", $(ids));
1144
1144
 
1145
- var elAll = $(ids).filter(function() {
1145
+ var elAll = $($(ids).filter(function() {
1146
1146
 
1147
1147
  if(this === $(Settings.identifier)) return false;
1148
1148
  return this.getBoundingClientRect().top < Sticky.getScrollPadding(scroller).top + 1;
1149
1149
 
1150
- }).sort(function (el1, el2) {
1150
+ }).toArray().sort(function (el1, el2) {
1151
1151
 
1152
1152
  return el1.offsetTop > el2.offsetTop ? -1
1153
1153
  : (el1.offsetTop < el2.offsetTop ? 1 : 0);
1154
- });
1154
+ }));
1155
1155
 
1156
1156
  var el = elAll.filter(function() {
1157
1157