Skip to content

Instantly share code, notes, and snippets.

@nicolechung
Created March 10, 2012 12:55
Show Gist options
  • Save nicolechung/2011347 to your computer and use it in GitHub Desktop.
Save nicolechung/2011347 to your computer and use it in GitHub Desktop.
Fancybox: Vimeo
$(".vimeobox").click(function(e) {
e.preventDefault();
var id = $(this).attr('id');
var title = 0; // hide vimeo title
var byline = 0; // hide byline
var portrait = 0; // hide thumbnail portrait
var autoplay = 1;
var url = "http://player.vimeo.com/video/" + id +
"?title=" + title +
"&byline="+ byline +
"&portrait=" + portrait +
"&autoplay" + autoplay;
$.fancybox({
'href': url,
'type': 'iframe',
'autoSize':false,
'fitToView':true
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment