wrapper for fitvids.js - fitting a video responsively
see source @ https://github.com/davatron5000/FitVids.js
see background - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/
Requires jQuery 1.7+
Add this line to your application's Gemfile:
gem 'fitvidsjs_rails'
add to manifest application.js
//= require fitvids.js
And then execute:
$ bundle
Or install it yourself as:
$ gem install fitvidsjs_rails
<script src="path/to/jquery.min.js"></script>
<script src="path/to/jquery.fitvids.js"></script>
<script>
$(document).ready(function(){
// Target your .container, .wrapper, .post, etc.
$("#thing-with-videos").fitVids();
});
</script>
see https://github.com/davatron5000/FitVids.js for more info
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request