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
var img = new Image(); | |
$(img).on('load', function(e){ | |
// Your code here | |
}).each(function() { | |
if(this.complete) $(this).load(); | |
}); | |
img.src = "http://dummyimage.com/600x400"; |
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 resizeVideo() { | |
var videoEl = document.getElementsByTagName('video')[0]; | |
var videoOriginalWidth = 854; | |
var videoOriginalHeight = 480; | |
var videoRatio = videoOriginalWidth/videoOriginalHeight; | |
var winWidth = window.innerWidth; | |
var winHeight = window.innerHeight; | |
var videoWidth; | |
var videoHeight; | |
var videoDimensionMultiplier = 1.1; |
NewerOlder