acid 3 test
Labels: acid 3, css, DOM, javascript
The future of the web. The health of the web.
Labels: acid 3, css, DOM, javascript
Here. A big table of solvents properties and miscibility. Click or double click the table head to sort. The table background changes as your mouse wandering around to high light current table cell. Supposed to wWorks in IE7 too, but never tested. Works in Safari 3, Firefox 2, IE7, Opera 7.5. Opera has some high light problem. And the sorting works like a magic in Safari and Opera.
For mouseover event outside a tag in IE7,
is required.
Labels: background, css, javascript, sortable table, tr:hover
Or that means
var divs = document.getElementsByTagName("div"); var i; for( i in divs ){ divs.items(i).innerHTML = "B"; }
doesn't work in Safari. Some people may know that there is another way to access a nodeList in Firefox and IE, like
var divs = document.getElementsByTagName("div"); var i; for( i in divs ){ divs[i].innerHTML = "B"; }
However, this doesn't work in Safari too. (Actually it is wrong even in Firefox and IE.) The right way is
var divs = document.getElementsByTagName("div"); var i; for( i= 0; i < divs.length; i ++ ){ divs.items(i).innerHTML = "B"; }
The reason is that in Firefox or IE, nodeList is treated as an array, but Safari doesn't.
Labels: for...in, javascript, loop, safari