Using jquery preview url plugin
Posted By : Arun Kumar | 23-Oct-2015

jQuery Preview is a plugin by Embedly that allow developers to add url preview functionality that reads the input and generates a rich preview where user can select the preview thumbnail and description.
Basic Setup :
1.Include jQuery, Embedly jQuery, jquery.preview.js and preview.css in the html page.
2.Create input field and add a div with class name "selector-wrapper" inside the same parent element.
3.Call the plugin on the input with javascript.
$('input').preview({'key':'embley_key'});
Customizing the usage using the options object.
This plugin has options object that contains: "bind ,error ,success ,render" method.
a) Bind : This can have values set to true or false.
incase of true: the plugin uses is own defined method to trigger the preview functionality.
incase of false;The preview functionality should be triggered manually.
b) Error : This can be used to show the error message incase of unsuccessful event.
c) Success: This method gets triggered when the url is fetched successfully.
THANKS
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Arun Kumar
Arun is a creative UI Developer