Socket
Socket
Sign inDemoInstall

ab-interchange

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ab-interchange - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

9

AB-interchange.js

@@ -37,4 +37,5 @@ !(function(name, definition) {

Interchange.defaults = {
lazy : false,
delay : 100
lazy : true,
delay : 100,
offscreen : 1.5
};

@@ -131,3 +132,5 @@

_inView: function() {
return this.element.getBoundingClientRect().top + $(window).scrollTop() <= $(window).scrollTop() + window.innerHeight;
var scrollTop = $(window).scrollTop(),
windowHeight = window.innerHeight;
return this.element.getBoundingClientRect().top - windowHeight * this.settings.offscreen + scrollTop <= scrollTop + windowHeight;
},

@@ -134,0 +137,0 @@

{
"name": "ab-interchange",
"version": "1.2.0",
"version": "1.2.1",
"description": "AB-interchange: While responsive image loading is not really an easy task even today, here is a solution to manage conditional (based on breakpoints) loading of img, background-image or even HTML content.",

@@ -26,4 +26,4 @@ "main": "ab-interchange.js",

"dependencies": {
"ab-mediaquery": "1.3.1"
"ab-mediaquery": "^1.3.2"
}
}

@@ -32,4 +32,5 @@ # AB-interchange

abInterchange({
lazy: false, // or true
delay: 100 // debounce time on scroll event (only when lazy loading is true)
lazy : false,// or true
delay : 100 // debounce time on scroll event (only when lazy loading is true)
offscreen : 1.5 // load items only when in the view + 0.5
});

@@ -36,0 +37,0 @@ ```

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc