Ok – so you need to support IE7. Here’s a short list of things you may need
- IETester (http://www.my-debugbar.com/wiki/IETester/HomePage) to test IE8 and downwards. this was the easiest option for me to install and use multiple IE versions on windows
- First write a IE 7 < detection script like so
needsIEFix:function() {
var ua = navigator.userAgent;
return /msie [5-7]\./i.test(ua);
}
- Started getting the following error. Resolved using (http://amix.dk/blog/post/19388)
Expected identifier, string or number
- Things that were center aligned in IE8 and chrome, firefox etc were broken in IE7. Used this to fix this prob (http://iemarginfix.sourceforge.net/tests/marginfix.html)
- z-index problem. Google this and you will see many solutions. My main prob was my dropdown menus were being hidden below other divs. I applied the following javascript soln.
if( common.needsIEFix() ) {
var zIndexNumber = 1000;
$(‘div’).each(function() {
$(this).css(‘zIndex’, zIndexNumber);
zIndexNumber -= 1;
});
}
- The above soln to z-index was causing some elements to disappear in IE7. The orig soln was zIndexNumber -= 10; which I replaced with zIndexNumber -= 1; as the zIndex was becoming negative and hence some elements were disappearing.
- Then came the prob of JQuery dialogs which would not allow keyboard inputs i.e forms in modal dialogs were not fillable – no keyboard events were reaching it. The soln was to make the modal dialogs non modal as in IE7 modal dialogs do not allow keyboard inputs to be received by the dialog.
- Jquery .html() function to replace html of a given div was not working e.x $(“#xyz”).html(custom_html) was not working. the problem was that #xyz was not unique id in the current DOM. Ensure unique id is used when using .html() function.
- Also had problems with float:right – fixed using (http://stackoverflow.com/questions/1820007/ie7-float-right-problems)