Comments (4)
The question is, why there are elements with a source, that should not ne changed in a Lazy instance? Don't add them of they should not be handled. And of you change the elements outside of Lazy, then you need to manually remove them from the instance.
from jquery.lazy.
I have another script that puts in another image from another source before Lazy and Lazy doesn't know about it.
Ideally Lazy would create a data-status attribute after inserting the image into src, saying that src has already been changed. At the same time, if I create such an attribute before Lazy, Lazy will skip that element.
And I can do it with callback like this:
afterLoad: function (element) {
element.attr('data-status', 'done');
}
but Lazy dont know what it means, because callback beforeLoad dont know cancel loading. Am I right?
I tested some flow how to do it, but first call is made by beforeLoad, then my outside script made some changes and then afterLoad. I am unable to control Lazy.
from jquery.lazy.
Three ways:
- Create a custom loader for Lazy.
- Let the other script remove the item from that Lazy instance to Lazy doesn't handle that item at all.
- But the best idea would be to create a clean behavior. Two script changing the same attribute on one item is never a good idea. I would suggest changing the workflow.
from jquery.lazy.
I see that handledName dooing what I am looking for.
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
- Custom Content Loaders broken with jQuery 3.x HOT 4
- 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
- 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.