Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nealrs/ythl

Minimal YouTube embeds that open & auto-play on hover
https://github.com/nealrs/ythl

Last synced: 1 day ago
JSON representation

Minimal YouTube embeds that open & auto-play on hover

Awesome Lists containing this project

README

        

## YouTube Hover Links (YTHL) - a JS experiment

**[Live demo](http://nealrs.github.io/YTHL)**

YTHL creates minimal YouTube embeds that open & auto-play on hover. Result: less wasted real estate.

**Instructions**

1. Load up jQuery, `ythl.css`, and `ythl.js` in ``.

2. Use `` elements and data-attributes to embed your video. Here's how you'd embed Katy Perry's _Roar_ music video: `` Neat right? just plug in the video id, your link text, and an autoplay flag. YTHL does the rest.

3. Srsly bro, that's it. Enjoy!

**Notes**

YTHL depends on [Fitvids.js](https://github.com/davatron5000/FitVids.js) for responsive embeds - but if you can live without that, you can also nix jQuery. (You'll have to refactor some of the code though.)