Skip to content

Instantly share code, notes, and snippets.

@goodpic
Created February 24, 2010 04:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goodpic/313084 to your computer and use it in GitHub Desktop.
Save goodpic/313084 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
// Configure jQuery oEmbed library
$.fn.oembed.defaults = {
maxWidth: 500, maxHeight: 400,
embedMethod: "append" // "replace", "auto", "append", "fill"
};
// Append the oEmbed contents fetched from #oembed_url
$("form#oembed_form").submit( function () {
$("#oembed_contents").oembed($("#oembed_url").attr("value"));
return false;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment