how to avoid ugly and slow animation of jqm when load an image on page loaded?
I am using camera plugin of cordova to take a photo on camera success i have this function:
- previewPhoto: function (filename) {
- console.log("previewPhoto: execute numFoto " + this.numFoto);
- var img = new Image();
- img.onload = function () {
- $("#hGallery").append("<span id='image" + this.numFoto + "'></span");
- $("#image" + this.numFoto).append("<a id='btnFotoAnteprima" + this.numFoto + "' href='#'></a>");
- $("#btnFotoAnteprima" + this.numFoto).append("<img id='fotoAnteprima" + this.numFoto + "' src=" + img.src + " width='128px' height='128px'/>");
- //camera.refreshData();
- }
- img.src = filename;
- if (app.storage !== undefined) {
- console.log("key foto: " + "foto" + this.numFoto);
- app.storage.setItem("foto" + this.numFoto, filename);
- console.log("fotos " + app.storage.getItem("foto" + this.numFoto));
- } else {
- console.log("Sorry! No Web Storage support..");
- }
- this.numFoto++;
- },
Simply i append the photo taked with the plugin to the page but i obtain this ugli animation:
i have this page: