Created
July 16, 2013 14:21
-
-
Save pfulton/6009168 to your computer and use it in GitHub Desktop.
pjax + picturefill
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($){ | |
$(document).on('pjax:complete', function(){ | |
if (typeof window.picturefill != 'undefined'){ | |
window.picturefill(); | |
} | |
}); | |
}(jQuery)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.