Now, I have images gallery based on ajax call which will load new different images based on user search.
For this, I need to give a progress function which will show gif image before the image is really done to be loaded by browser.
Can you help, please.
fetch: function(imgsrc) {
//get the image
var self = this;
var newImg = new Image();
newImg.onload = function() {
//set the large image dimensions - used to calculte ratio's
self.largeWidth = newImg.width;
self.largeHeight = newImg.height;
//once image is loaded start the calls
self.startZoom();
self.currentImage = self.imageSrc;
//let caller know image has been loaded
self.options.onZoomedImageLoaded(self.$elem);
}
newImg.src = imgsrc; // this must be done AFTER setting onload
return;
},
Thanks for the plugin. I am using it in my web.
Now, I have images gallery based on ajax call which will load new different images based on user search.
For this, I need to give a progress function which will show gif image before the image is really done to be loaded by browser.
Can you help, please.