I'm loading content dynamically using a XHR-request, containing some picture-elements. How can I re-initiate picturefill to handle these?
Just call picturefill() after your new content has been added to the DOM.
So simple that I can't see why I didn't try that before. Thanks!
If you add a processed class to the div, you have to remove it on resize/orientationchange, otherwise the picturefill isn't executed on existing images.
Thanks @seansean for the answer. It helped me solving my problem :)
@Jpunt This can be closed I think.
@luksak Maybe you want to open another issue and suggest this idea again.
The serious performance issues i was facing were caused by the combination of picturefill and respond.js. @attiks was so kind to create a media query cache for picturefill for the Drupal module. This was a huge performance improvement. AND it works in IE :)
Thanks for your ideas here. We're closing this out as Picturefill moves to support the new standard markup landing in browsers. Thread here: #125
Also, Angular info is linked in the readme.
Can we re-open this? I too am dynamically loading in images and have found that on IE10 if there is more than 40 images the browser crashes!! Actually I'll create a bug for this.