Comments (4)
But then it's an issue of your content loader and not of lazy?! The error message says the error is inside of blogloader
what is clearly not a lazy function ...
from jquery.lazy.
@dkern it's simply the name of the custom loader being used. Whether it's customLoaderName
or blogloader
is irrelevant since they can be named anything according to your documentation. The full code:
<div class="blogarchive" data-loader="blogloader">
[content]
</div>
$(window).on("load", function() {
$(".blogarchive").Lazy({
blogloader: function(element) {
element.load();
}
});
});
Like I said, this works just fine with jQuery 1.x and 2.x, but because of the removal of .load()
in jQuery 3.x it breaks. We just need an alternative to element.load()
but I'm not sure how that would work with your plug-in (that's the part I'm not really versed in).
from jquery.lazy.
As you may saw in the docs, you can also use the response callback on any custom loader.
$(".blogarchive").Lazy({
blogloader: function(element, response) {
response(true);
}
});
from jquery.lazy.
@dkern ah ok thank you, that works. I saw the response function but looked like it was only for async situations (which I wasn't using). May want to place a courtesy note in your documentation that the response callback must be used with jQuery 3.x instead of element.load()
.
Appreciate it!
from jquery.lazy.
Related Issues (20)
- In Computer works like a charm. not working on mobile devices HOT 1
- Images downloading twice in Chrome HOT 2
- How to use jQuery.Lazy() Plugin with an image containing a cache-busting hash HOT 8
- Issue when using jQuery.Lazy() Plugin with a function AJAX call HOT 5
- images aren't shown if they doesn't come to visibility by scroll HOT 2
- images with srcset load all at once HOT 2
- Slow image load handling HOT 1
- Doesn't trigger when new elements are toggled in HOT 2
- JS Error When Using on Cloned Template HOT 3
- laravel-mix, cannot reuse lazy HOT 1
- Deprecated
- Defer the lazy loading HOT 1
- Don`t change src when exists HOT 4
- Intermittent image load with AJAX return
- Custom loader using Ajax fails (not even fired), while lazyloading images work. HOT 1
- Bugs with gsap scrolltrigger in Safari HOT 3
- Throttling by number of calls HOT 1
- Images loading twice HOT 2
- Not able to get it working in FireFox 121.0.1 on Mac OS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jquery.lazy.