<a class="youtube" href="http://www.youtube.com/watch?v=4eYSpIz2FjU">Link title</a> <a class="youtube" href="http://www.youtube.com/embed/4eYSpIz2FjU">Link Title</a> <a class="youtube" href="http://youtu.be/4eYSpIz2FjU"><img src="..." /></a>
<button>
element with YouTube id in rel
attribute:
<button class="youtube" rel="4eYSpIz2FjU">Click me</button>
<img>
element with YouTube id in rel
attribute:
<img class="youtube" rel="4eYSpIz2FjU" src="..." />
<img>
element with YouTube id in rel
attribute and thumbnail from YouTube:
<img class="youtube" rel="4eYSpIz2FjU" src="http://img.youtube.com/vi/4eYSpIz2FjU/1.jpg" />
<script type="text/javascript"> $(function () { $(".youtube").YouTubeModal({autoplay:0, width:640, height:480}); }); </script>