jquery_upload_preview | small jQuery plugin , which provides a live preview
kandi X-RAY | jquery_upload_preview Summary
kandi X-RAY | jquery_upload_preview Summary
This jQuery plugin provides an easy way to preview your uploads before they're actually uploaded to the server. So if you selected an image or audio file from your hard drive, it will generate a live preview of the selected image or audio player for the audio file.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of jquery_upload_preview
jquery_upload_preview Key Features
jquery_upload_preview Examples and Code Snippets
Community Discussions
Trending Discussions on jquery_upload_preview
QUESTION
I am using a plugin called jquery upload preview to upload an image and preview the image on the div as its background.
In my web page, I am dynamically creating more and more divs with the same class name but since the class names are all the same, the upload preview is getting applied for all. I want every other div to get isolated/differentiated from each other.
Is there any solution I can apply here? Please check out this link, it's a pen where I have isolated the issue.
The plugin uses $.uploadPreview (for your quick reference) and the field is called preview_box : '.imgCard',
Thank you so much, guys.
Below is the code in HTML and JS.
HTML
...ANSWER
Answered 2018-Apr-02 at 05:50First of all you cannot clone divs with an id without altering that id, since in html the id
has to be unique.
What you need to do is you have to manipulate the newly added row and change the id="front-image-upload"
to id="front-image-upload-2"
and class="imgCard"
to class="imgCard-2"
(or create a new class if you are going to loose some styling if you replace imgCard with imgCard-2) for the second cloned row and so on. You can do this by using a callback function on onAdd
of czMore
as follows:
QUESTION
At this moment, I'm using this library for image preview: jQuery Upload Preview. Is it possible to use it multiple times on one page without duplicating preview?
...ANSWER
Answered 2017-May-01 at 19:10Looks like you need to give each element a unique id and call the plugin after inserting each one into the DOM.
Here's a kind of kludgy way to do it:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install jquery_upload_preview
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page