Skip to content

Instantly share code, notes, and snippets.

@ricardobeat
Created August 20, 2010 16:43
Show Gist options
  • Save ricardobeat/540670 to your computer and use it in GitHub Desktop.
Save ricardobeat/540670 to your computer and use it in GitHub Desktop.
$('#videos a').click(function(){
var video_url = $(this).attr('href');
// o OOHembed retorna o HTML do tuiube embed
$.getJSON('http://oohembed.com/oohembed?callback=?', {
url: video_url,
format: 'json',
maxwidth: $(window).width()-160,
maxheight: $(window).height()-160
}, function(response){
$.fn.colorbox({
html: response.html,
innerWidth: +response.width+10,
innerHeight: +response.height+10,
scrolling: false
});
});
return false;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment