Using jquery preview url plugin

Posted By : Arun Kumar | 23-Oct-2015

Using JQuery Preview URL Plugin

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  jQueryEmbedly jQueryjquery.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

About Author

Author Image
Arun Kumar

Arun is a creative UI Developer

Request for Proposal

Name is required

Comment is required

Sending message..