Rewrote browser detection for future-proofing
Posted by mholmes on 04 Apr 2007 in Activity log
My browser detection for using the IE-specific filter setting instead of the CSS standard opacity value was based on document.all, which doesn't really make sense. Since all we care about is opacity in this code, I've substituted this:
if (typeof [theObject].style.filter !='undefined')
The idea comes from this page on the Opera site, but the method shown there for setting the opacity:
[theObject].style.filter.alpha.opacity = 100;
doesn't work in IE7; I had to use this instead:
[theObject].style.filter = 'alpha(opacity=100)';
This is a precursor to working on the slower fade-in and fade-out.