Sha256: 195a4a6b67b8b1614c34598d4972aa3f8f3174869a2f671e633e4e3c88d45a8a

Contents?: true

Size: 1.82 KB

Versions: 4

Compression:

Stored size: 1.82 KB

Contents

# Introducing FitVids.js
A lightweight, easy-to-use jQuery plugin for fluid width video embeds.

FitVids automates [the Intrinsic Ratio Method by Thierry Koblentz](http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/) to achieve fluid width videos in your responsive web design.

## How Do I Use It?
Include jQuery 1.7+ and FitVids.js in your layout and target your videos container with `fitVids()`.

```html
<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>
```

This will wrap each video in a `div.fluid-width-video-wrapper` and apply the necessary CSS. After the initial Javascript call, it's all percentage-based CSS magic.

## Currently Supported Players
<table>
<tr><td>YouTube</td><td>Y</td></tr>
<tr><td>Vimeo</td><td>Y</td></tr>
<tr><td>Blip.tv</td><td>Y</td></tr>
<tr><td>Viddler</td><td>Y</td></tr>
<tr><td>Kickstarter</td><td> Y</td></tr>
</table>

## Add Your Own Video Vendor
Have a custom video player? We now have a `customSelector` option where you can add your own specific video vendor selector (_mileage may vary depending on vendor and fluidity of player_):

```javascript
  $("#thing-with-videos").fitVids({ customSelector: "iframe[src^='http://mycoolvideosite.com'], iframe[src^='http://myviiids.com']"});
  // Selectors are comma separated, just like CSS
```

_Note:_ This will be the quickest way to add your own custom vendor as well as test your player's compatibility with FitVids.

## Changelog
* _09.02.11 - v1 - 2.376kb_
  * Added `customSelector` option
* _09.02.11 - v1 - 2.135kb_
	* Initial release
	* Vimeo,YouTube, Blip.tv, Viddler, Kickstarter

## Credits
@ChrisCoyier, @davatron5000, @TrentWalton, @raygunray

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
survivalkit-1.0.beta.15 templates/project/sources/FitVids/README.md
survivalkit-1.0.beta.14 templates/project/sources/FitVids/README.md
survivalkit-1.0.beta.13 templates/project/sources/FitVids/README.md
survivalkit-1.0.beta.12 templates/project/sources/FitVids/README.md