Why is it JavaScript is never as simple as it seems? :S
Hate it
Struggling to get this to work... even though im kinda confused as to why its not... reading up and stuff and this SEEMS like it should work
html structure is:
<div class="navigation">
<ul id="resources">
<li><a href="#" title="whatever">some text</a></li>
</ul>
Thanks, as usual, java is driving me nuts over the most simplest things
Hate it

Struggling to get this to work... even though im kinda confused as to why its not... reading up and stuff and this SEEMS like it should work
window.onload = function() {
var links = document.getElementById('resources').getElementsByTagName('li').getElementsByTagName('a');
var n = links.length;
for (var i = 0; i < n; i++) {
if (links.title && links.title != '') {
// add the title to anchor innerhtml
links.innerHTML += '<span>'+links.title+'</span>';
links.title = ''; // remove the title
}
}
}
html structure is:
<div class="navigation">
<ul id="resources">
<li><a href="#" title="whatever">some text</a></li>
</ul>
Thanks, as usual, java is driving me nuts over the most simplest things
