Skip to content

Instantly share code, notes, and snippets.

@alykat
Created January 8, 2014 16:23
Show Gist options
  • Save alykat/8319550 to your computer and use it in GitHub Desktop.
Save alykat/8319550 to your computer and use it in GitHub Desktop.
...
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