-
Notifications
You must be signed in to change notification settings - Fork 5
Home
Harsh Raval edited this page Feb 12, 2014
·
3 revisions
jQuery plugin for having live preview of selected image from file browser (input[type=file]).
- Easily configurable.
- Provide default image to be displayed as place holder.
- Animations while changing the image.
- Display image in different shapes.
- Works in all major browsers.
- MIT License.
/* Here imgLive is the id of input having type=file. */
$("#imglive").livePreview({
width:'64px',
height:'64px',
shape: {
type: 'round'
}
});
More examples can be found here.
Requires jQuery and jQuery UI.
Only works for selecting image, if you are planing to select other files and than this will fail.
Wiki page for Configuration Options.
Version: 1.0
Author: Harsh Raval
Created on: 11 Feb 2014
To get more details about it call the function with some random id and it will return you the details.
var a = $("#noMeaningOfThisId").premage();
console.log(a);