Loading image in Opera 10.10 issue
I am trying to develop a plugin to watch panorama images for jQuery. The plugin is supposed to load two images: a small one and a big one. The big image is supposed to load when the user clicks on "enlarge" icon.
The problem is thah the big image won't load in Opera (in FF,IE8,Chrome everything is fine). The big image is loaded exactly the same as the small one.
Here is the code the loads the small one:
- // ....
- /*creating image*/
- var self = this;
- this.$iImg = $('<img>')
- .attr('src',this.iImgSrc)
- .attr('title',this.iTitle)
- .load(function(){
- self.iSetup(); // setup inline viewport
- $loader.remove(); // remove loader image
- self.iBuild(); // build and display inline viewport
- });
Then the code that loads the big image:
- iBuild: function(){
- //...
- var self = this;
- // expand button click handler
- $(this.$iBtnExpand).bind('click',function(e) {
- self.pInit();
- });
- //...
- },
And the function pInit() itslef
- pInit : function() {
- var self = this;
- this.$pImg = $('<img>')
- .attr('src',this.pImgSrc)
- .attr('title',this.pTitle)
- .load(function(){
- // ... here is the call to display image
- // in this case just notify that the image is loaded would be enough
- alert('Image is loaded');
- });
- },
Alert won't popup in Opera.
Tried everything I could. No results. Thanks for any help :-)