Skip to content

Instantly share code, notes, and snippets.

@Pross Pross/gist:9262487
Last active Aug 29, 2015

Embed
What would you like to do?
$.ResizeCanvasVids = {
init: function(){
$.ResizeCanvasVids.checkLoop()
}
, checkLoop: function(){
$('.bg-video').each( function(){
var video = this
$(video).hide()
var intervalId = setInterval(function() {
if (video.readyState === 4) {
$(window).trigger('resize')
clearInterval(intervalId)
$(video).fadeIn('slow')
return false
} else {
console.log('nope')
}
}, 100);
})
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.