-
Notifications
You must be signed in to change notification settings - Fork 318
Open
Description
When working properly, a pinned div would look something like:
Today, I was experimenting with webp images and using Modernizr to switch out between standard images/webp based on browser functionality, and found that it broke the pinning functionality - the same div now looks like:
This is the bit of script being used to switch images out
Modernizr.on('webp', function (result) {
// result == Modernizr.webp
console.log(result); // either true or false
if (result) {
// WebP Support
$(".webpImage").queue(function() {
var webp = $(this).attr('data-webp');
$(this).attr('src', webp)
})
}
else {
// No WebP support
$(".webpImage").queue(function() {
var nowebp = $(this).attr('data-img-fallback');
$(this).attr('src', nowebp)
})
}
});
Metadata
Metadata
Assignees
Labels
No labels