I am just making a PhoneGap app with Cloudinary Unsigned uploads and it's working well (i.e.,) When a user clicks anywhere on the screen the Image Picker is shown but I am just in need of showing the Image Picker only when a user clicks on a particular div.
How can I achieve this? please help.
Here is the code which I have used to attach cloudinary
$('document').append($.cloudinary.unsigned_upload_tag("bvxxxxxx", {
cloud_name: 'sample'
}));
$('.uploader').unsigned_cloudinary_upload("xxxxxxcy", {
cloud_name: 'sample'
}, {
multiple: true
}).bind('cloudinarydone', function(e, data) {
$("body").addClass("ui-loading");
galleryMethods.savePictures(data.result.secure_url);
// $('.thumbnails').append('<img src="' + data.result.secure_url + '" style="height:30px;width:30px;">');
console.log("cloudinarydone");
$("body").removeClass("ui-loading");
}
).bind('cloudinaryprogress', function(e, data) {
var progVal = Math.round((data.loaded * 100.0) / data.total);
$("body").addClass("ui-loading");
if (progVal == "100") {
// cm.showAlert("Uploaded Successfully");
$("body").removeClass("ui-loading");
}
});
P.S: I am using Jquery Mobile-1.4.5 framework.