-
Notifications
You must be signed in to change notification settings - Fork 1.1k
added picturefill ready & update events and jslint fixes #60
Conversation
any clues when this will be pulled in? would be a great feature to have... |
bump :) |
While this feature would be awesome, it breaks in IE8. |
Really looking for this feature to be able to lazyload the given image. How is the syntax to use picturefill_ready and picturefill_update? |
@zoo2rock if you're looking to lazyload, i have a branch at https://github.com/nwtn/picturefill/tree/resourcepriorities or https://github.com/nwtn/picturefill/tree/picturefull that takes a postpone attr to delay loading until the image is in the viewport. |
@nwtn thx, I will check out your branch. So far I determine the most dominant color (serverside), attach the color as BG-color to the picturefill span and lazyload (https://github.com/tuupola/jquery_lazyload) the responsive images/picturefill images. Because of my given setup I'm interested how to listen / define the callback for picturefill. Any suggestions? Thanks. |
@nwtn thx, looks great your fork! |
@zoo2rock great, glad it was helpful for you |
@u982744 - Great job on your update, I am looking for a way to have a callback triggered after the images are loaded. I think this is similar to #53 in that I am trying to determine maximum height of a set of divs. After reading through the comments it sounds like the general consensus is to handle this separately than the picturefill itself. Any updates on your pull? |
I've made it work in IE8 now. You have to use the method picturefill.bind though. This is because a workaround needs to be used to allow custom events in IE8. eg picturefill.bind("picturefill_update", function () { |
Bump for merge, picturefill doesn't seem to work at all when I try to drop-in the forked version and we desperately need this. |
Hm, this one is tricky. It’s an easy enough change, but would take us back out of “polyfill” territory. In the case of the native We’ll talk this one over internally and get back to everyone. |
I agree. I think this is beyond scope for picturefill, and it won't apply in supporting browsers anyhow. but onload should allow for a similar handler, I think?
|
Closing based on prior comment. Thanks! |
Fires picture fill ready event first time, then picture fill update event subsequent times. Also updated picturefill code to pass jslint.