User:Locke/common.js: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
var wdth = uls[i].clientWidth + 1; | var wdth = uls[i].clientWidth + 1; | ||
alert(wdth); | alert(wdth); | ||
uls[i].style.width = uls[i].clientWidth + 1; | uls[i].style.width = uls[i].clientWidth + 1 + "px"; | ||
} | } |
Revision as of 04:55, October 6, 2012
var uls = document.getElementById('toc').getElementsByTagName('ul')[0].getElementsByTagName('ul'); for(var i=0; i<uls.length; ++i) { var wdth = uls[i].clientWidth + 1; alert(wdth); uls[i].style.width = uls[i].clientWidth + 1 + "px"; }