Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

executable file 54 lines (45 sloc) 1.936 kb
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Embedly - Embed - Example</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js"></script>
<script type="text/javascript" src="../jquery.embedly.js"></script>
<style>
BODY {background-color:#333333;}
#content{background-color:#FFFFFF;margin:0 auto;width:800px;}
#embedform {width:600px;margin: 20px auto;}
#embedform .url{border:1px solid #AAAAAA;font-size:1.5em;margin:10px 0;padding:5px;width:75%;}
#embedform .submit{float:right;font-size:1.7em;margin-top:10px;}
#embed {margin:auto;text-align:center;width:600px;}
#header{margin:0 auto;width:800px; height:75px;}
a img {border:none;}
li {list-style:none; margin:20px; }
</style>
</head>
<body>
<div id="header"><a href="http://api.embed.ly"><img src="http://static.embed.ly/images/logo.png"/></a></div>
<div id="content" class="main">
<ul>
<li><a href="http://www.hulu.com/awefonnawefoiaje">Video</a></li>
<li><a href="#url">Video</a></li>
<li><a href="http://revision3.com/awfej33i3j3nvvfs">Video</a></li>
<li><a class="other" href="http://localhost:8000">other</a></li>
</ul>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('ul a').bind('oembed', function(e){
$(this).after('<h2>'+$(this).data('oembed').title+'</h2>');
});
$("ul a").embedly({maxWidth: 400,
wrapElement: 'div',
method: "after",
endpoint: 'oembed',
key : '4d1f889c20ed11e1abb14040d3dc5c07',
error: function(node, dict){
$(node).append(dict.error_message);
}})
});
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.