src="jquery.min.js" type="text/javascript"
src="jquery.oembed.js" type="text/javascript"
Next, you add a div and and input tag to hold the embedded content in the link:src="jquery.oembed.js" type="text/javascript"
input id="olink" type="text"
div id="oembed"
Now add some functionality with Javascript. This should be placed in javascript tags right after the body tag in your HTML:div id="oembed"
$(document).ready(function() {
$("#olink").blur(function (){
olink = $("#olink").val();
$("#oembed").oembed(olink);
})
});
Next copy and paste a link into the text box and when you move your cursor away from the box, the link will convert to embedded content into your web page. A nice technique to have in your web design toolkit. Visit this link jQuery documentation for the full documentation of the oEmbed plugin.
$("#olink").blur(function (){
olink = $("#olink").val();
$("#oembed").oembed(olink);
})
});
No comments:
Post a Comment