jQuery URLive lets you easily create a live preview of any url base on its Open Graph properties and other details, similar to Facebook's post attachment.
It doesn't only work on a <textarea>
or <input>
it also works on <a>
tag and any other element with a URL on its content.
Include the latest jQuery library together with jquery.urlive.js
and jquery.urlive.css
on your documents <head>
.
After files inclusion, call urlive()
function on the element with the URL you want to show a preview. And pass the selector of the element that will contain the preview.
$(selector).urlive({ container: '.urlive-container' });
Tested on all modern browsers – Chrome, Firefox, Safari, also IE.
-
v1.0.2 (24 Feb 2014)
Add callback function
onClick
, add a handler to preview snippet click event -
v1.0.1 (25 Jan 2014)
Initial release
jQuery URLive is under MIT License
Detailed usage can be found at markserbol.github.io/urlive/. To learn more you can also contact me at my email found on my Github Profile or follow me on Twitter.