Saturday, March 13, 2010

jqModal IE7 Drop All Contents at the bottom fix

This seems to be a fix for jqModal when IE7 drops all to the bottom of the page while the top of the page is the jqModal.

Open the css that came with jqModal and change to the following codes
.jqmOverlay {
background-color: #000;
+position:absolute !important;

The +position:absolute !important is a css targeted for IE7, i know its a hack, if you don't what that you can include a css specially design for IE

Open the javascript and search for if(ie6){$('html,body') and change it to if(ie6||ie7){$('html,body'), resulting in
if(ie6||ie7){$('html,body').css({height:'100%',width:'100%'});if(o){o=o.css({position:'absolute'})[0];for(var y in {Top:1,Left:1}),"(_=(document.documentElement.scroll"+y+" || document.body.scroll"+y+"))+'px'");}}

Lastly still on the javascript search for ie6=$.browser.msie&&($.browser.version == "6.0") and change to ie6=$.browser.msie&&($.browser.version == "6.0"),ie7=$.browser.msie&&($.browser.version == "7.0"), resulting to
var s=0,H=$.jqm.hash,A=[],ie6=$.browser.msie&&($.browser.version == "6.0"),ie7=$.browser.msie&&($.browser.version == "7.0"),F=false,