Comments (16)
Hello @ipetrov87,
could you create a jsfiddle for me, where you can reproduce the problem? Then I would like to investigate. For now, the only idea i have, is a wrong use of the plugin. But that dosen't mean there could not be a bug. 😉
Thanks!
from jquery.lazy.
I try to create the jsfiddle, but no success. I use something like this but it is still working in all browsers. I have no idea what can be the problem. Do you have any ideas, what i can check?
from jquery.lazy.
So you could not recreate the problem? Well, I'm glad abaout that! ;)
The fact, that the images somethimes shows for a second but then disappear could be a indicator that some strange css kicks in. Or maybe you got some old js somewhere, doing it? Or maybe somthing with your responsive things? I saw the class img-responsive
in your example.
Lazy would not touch an element again after it was handlet once. So if a image is loaded the plugin will not remove it. And you say the loading works fine too. To there is no generally problem. But without seeing the code and the problem it is very difficult to detect the issue ...
from jquery.lazy.
I close this here, because this seems not to be a problem of the plugin. Feel free to response, if you have any other questions left.
from jquery.lazy.
I was leave this problem for a while because there was some other more important stuff to do, but now i am back. I trying with this
afterLoad: function(element) {
console.log(element);
}
In console i get only 2 empty row, from first two images that should be loaded. Witch it strange for me. Then i start to scroll down the page so I expect to see more empty rows, but there is nothing like the Lazy is not triggered. If you have any idea what can be, or what to check just say.
I also use onError event
onError: function(element) {
console.log('error loading ' + element.data('src'));
}
but i don`t get any of them in console.
from jquery.lazy.
It's still hard to say without seeing the code. And it is only in Safari?
Any way to upload the page / code and let me take a look there?
from jquery.lazy.
I can give a link to the page, but page is still in development. Can you give some e-mail to send it to you?
from jquery.lazy.
I have check the page on IPhone 6S Plus it is the same.
With dev tools on IPhone 6S Plus i am abble to see that console prints this:
[0: <img id="product-collection-image-1298">]
0 : img#product-collection-image-1298.img-responsive
0 : img#product-collection-image-1298.img-responsive
On a windows Chotme i get only one img, like this:
[0: <img id="product-collection-image-1298">]
0 : img#product-collection-image-1298.img-responsive
I am start to think some king of multiple jQuery import. I Make a search scripts and find that i have a jquery-1.10.2.min.js
and jquery-1.11.1.min.js
. But even if I remove one of then i still face same problem, and still see "Dublicated" images in console.
from jquery.lazy.
Yes, send it to jquery at eisbehr .de.
from jquery.lazy.
You should receive a email from me now.
from jquery.lazy.
Yes, it's here. Check your mails too. 😉
from jquery.lazy.
What was the solution here at the end?
Running in the same issue with Safari only. Would be good to know where I have to look into.
from jquery.lazy.
I'm not 100% sure anymore, but I think it was a missing DOCTYPE
tag in the html document.
from jquery.lazy.
I think that in the example #39, that I use for AJAX calls, was missed to be added bind: "event"
to configuration. Check this answer. Let us know if that helps.
from jquery.lazy.
It was neither of both, but still thanks for the quick answers.
After a long day of debugging today I found out that Safari is hanging as soon as I added document.onreadystatechange
.
I changed now to DOMContentLoaded
Event and fallback to load
Event for my custom JS. Safari uses the fallback and DOMContentLoaded is never fired. No clue why and which other used lib is doing this, but maybe somebody else stumbles over it and this helps.
from jquery.lazy.
I encountered a similar problem (images load fine in chrome and FF but in Safari nothing happens) and after debugging could pin point it to Safari not triggering window's load event for some reason, or it is triggered earlier than my scripts (enqueued in Wordpress, very standard).
This leads to _initialiaze never being called and images remaining empty.
My workaround now is to trigger window load event manually after defining the lazy elements. Its not pretty, but it did the work for now.
window.dispatchEvent(new Event('load'));
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
- 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.