Skip to content

Instantly share code, notes, and snippets.

@pfulton
Created July 16, 2013 14:21
Show Gist options
  • Save pfulton/6009168 to your computer and use it in GitHub Desktop.
Save pfulton/6009168 to your computer and use it in GitHub Desktop.
pjax + picturefill
(function($){
$(document).on('pjax:complete', function(){
if (typeof window.picturefill != 'undefined'){
window.picturefill();
}
});
}(jQuery))
@pfulton
Copy link
Author

pfulton commented Jul 16, 2013

We found that when using pjax, picturefill needs to be called once again once the pjax call has completed, or else the browser won't be aware of picturefill and it won't receive the properly sized images.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment