I have a side bar with accordion and I have plugin for it, and I also have plugin for image preview before saving the image in database. Now, the problem is if the plugin for accordion is loaded, the image preview won't work. How should I solve this dilemma? The plugin for sidebar is "js/jquery-2.1.4.js" and "js/main.js".
for my image preview:
<script type="text/javascript" src="js/jquery.uploadPreview.js"></script>
<script type="text/javascript" src="js/jquery.uploadPreview.min.js"></script>
<link href="product.css" rel="stylesheet">
<script type="text/javascript">
$(document).ready(function() {
$.uploadPreview({
input_field: "#image-upload1",
preview_box: "#image-preview1",
});
$.uploadPreview({
input_field: "#image-upload2",
preview_box: "#image-preview2",
});
$.uploadPreview({
input_field: "#image-upload3",
preview_box: "#image-preview3",
});
$.uploadPreview({
input_field: "#image-upload4",
preview_box: "#image-preview4",
});
});