From 63a5415cca5a7ebcc3cced50f7bd9037fc823c3a Mon Sep 17 00:00:00 2001 From: ville rantanen Date: Fri, 6 Jul 2012 09:32:07 +0300 Subject: [PATCH] smarter fix for IE --- galleryscript.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/galleryscript.js b/galleryscript.js index e7bbbb8..e511a06 100644 --- a/galleryscript.js +++ b/galleryscript.js @@ -994,8 +994,10 @@ function showbigimage(i) { ''); $('#imagesingle').css('max-width',width); $('#imagesingle').css('max-height',height); - $('#imagesingle').css('width','auto'); - $('#imagesingle').css('height',height); + if ($.browser.msie) { // IE does not work with max* + $('#imagesingle').css('width','auto'); + $('#imagesingle').css('height',height); + } } $('#imagecontainer').css('height',height); @@ -1069,9 +1071,12 @@ function preloadcheck() { var colorValue=32*completed/imgs.length + 223; $('#desccontainer').css('background-color',"rgb("+colorValue+","+colorValue+","+colorValue+")"); if (imgs.length==completed) { - clearInterval(preloader); - //$('#desccontainer').css('background-color',"rgba(255,255,255,0)"); FIX for IE - $('#desccontainer').css('background-color',"rgb(255,255,255)"); + clearInterval(preloader); + if ($.browser.msie) { + $('#desccontainer').css('background-color',"rgb(255,255,255)"); + } else { + $('#desccontainer').css('background-color',"rgba(255,255,255,0)"); + } } return; }