tags:

views:

1250

answers:

1

I have a floating div which contains a title and I want to change that title. I tried this:

$("div#dragTitle3").text("New Title");

But the title is actually in a table inside the div. This is the table:

<table><tbody><tr><td>Announcements</td><td style="text-align:right"><img src="buttontop.png" class="divTitleButton" id="dragButton3" onmousedown="javascript:toggleContentWin(3)"></td></tr></tbody></table>

I want to know how I can change the title without entering the whole table's code when I set the new table.

+1  A: 

This should work:

$("div#dragTitle3 td:first").text("New title")
Ronald Wildenberg
Perfect! Thanks.
Hintswen