<sup> tags in header in the wrong place
Brought to you by:
workingwithme
Try the following code:
the sup tags are moved from left to right.
<html><head>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/css.js"></script>
<script type="text/javascript"
src="js/standardista-table-sorting.js"></script>
</head><body>
<table class="sortable">
<thead>
<tr>
<th>
something1<sup>1</sup>
</th>
<th>
something2<sup>2</sup>
</th>
<th>
something3<sup>3</sup>
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<a href="123.html">
asd
</a> </td>
<td>
<a href="123.html">
ggggg
</a> </td>
<td>
<a href="123.html">
dfgdfg
</a> </td>
</tr>
</tbody>
</table>
</body>
</html>
Logged In: NO
I mean not the sup tags themselves, but their rendering. ;-)
Logged In: NO
You can circumfence the problem by using innerHTML instead of appendChild:
Change:
// move the current contents of the cell that we're
// hyperlinking into the hyperlink
var innerEls = th.childNodes;
for (var j = 0; j < innerEls.length; j++) {
linkEl.appendChild(innerEls[j]);
alert(j + " : " + innerEls[j] + " : " + innerEls[j].innerHtml);
}
to something like:
linkEl.innerHTML = th.innerHTML;
th.innerHTML = "";