Created
January 8, 2014 16:23
-
-
Save alykat/8319550 to your computer and use it in GitHub Desktop.
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 $filmstrip_cotton = $('#boxes').find('.filmstrip-wrapper'); | |
var $filmstrip_cotton_wrapper = $('#boxes').find('.filmstrip-outer-wrapper'); | |
... | |
var filmstrip_cotton_aspect_width = 720; | |
var filmstrip_cotton_aspect_height = 528; | |
... | |
function size_filmstrip() { | |
var filmstrip_cotton_width = $filmstrip_cotton_wrapper.width(); | |
var filmstrip_cotton_height = Math.ceil((filmstrip_cotton_width * filmstrip_cotton_aspect_height) / filmstrip_cotton_aspect_width); | |
$filmstrip_cotton.width(filmstrip_cotton_width + 'px').height(filmstrip_cotton_height + 'px'); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment