Monday 8 August 2011

IE9 Javascript change

I ran into a problem where by a piece of positioning Javascript that worked in all browser including IE 8 did not work in IE9.  "style.top" did not work under IE9 !

The original code was this...

ele.style.top = (a - b);

I had to change it to...

ele.style.tp = (a - b).toString() + 'px';