Bump version number to 3.0.4
[bookreader.git] / BookReader / BookReader.js
index 7bfbbc9..5bd7692 100644 (file)
@@ -804,9 +804,17 @@ BookReader.prototype.lazyLoadImage = function (dummyImage) {
             // Remove class so we no longer count as loading
             $(this).removeClass('BRlazyloading');
         })
-        .attr( { width: $(dummyImage).width(),
-                   height: $(dummyImage).height(),
-                   src: $(dummyImage).data('srcURL')
+
+        //the width set with .attr is ignored by Internet Explorer, causing it to show the image at its original size
+        //but with this one line of css, even IE shows the image at the proper size
+        .css({
+            'width': $(dummyImage).width()+'px',
+            'height': $(dummyImage).height()+'px'
+        })
+        .attr({
+            'width': $(dummyImage).width(),
+            'height': $(dummyImage).height(),
+            'src': $(dummyImage).data('srcURL')
         });
                  
     // replace with the new img
@@ -2213,8 +2221,8 @@ BookReader.prototype.flipLeftToRight = function(newIndexL, newIndexR) {
             $(self.prefetchedImgs[newIndexL]).css('zIndex', 2);
 
             //jquery adds display:block to the element style, which interferes with our print css
-            $(self.prefetchedImgs[newIndexL]).css('display', null);
-            $(self.prefetchedImgs[newIndexR]).css('display', null);
+            $(self.prefetchedImgs[newIndexL]).css('display', '');
+            $(self.prefetchedImgs[newIndexR]).css('display', '');
             
             $(self.leafEdgeR).css({
                 // Moves the right leaf edge
@@ -2365,8 +2373,8 @@ BookReader.prototype.flipRightToLeft = function(newIndexL, newIndexR) {
             $(self.prefetchedImgs[newIndexR]).css('zIndex', 2);
 
             //jquery adds display:block to the element style, which interferes with our print css
-            $(self.prefetchedImgs[newIndexL]).css('display', null);
-            $(self.prefetchedImgs[newIndexR]).css('display', null);
+            $(self.prefetchedImgs[newIndexL]).css('display', '');
+            $(self.prefetchedImgs[newIndexR]).css('display', '');
             
             $(self.leafEdgeL).css({
                 width: newLeafEdgeWidthL+'px',