jQuery を使用して見出しの 1 つのテキストを変更しようとしていますが、見出しが空白のままになります。どうすればこれを機能させることができますか?
編集:
見出しのある html ページ:
<!-- Logs -->
<div data-role="page" data-theme="a" id="page15">
<div data-theme="a" data-role="header">
<h3>
Logs
</h3>
<a data-role="button" data-direction="reverse" data-transition="slide" href="#page3" data-icon="arrow-l" data-iconpos="left" class="ui-btn-left">
Back
</a>
</div>
<div data-role="content" style="padding: 15px">
<a data-role="button" data-transition="slide" href="#page1">
Add log entry
</a>
<div data-role="collapsible-set" data-theme="" data-content-theme="">
<div data-role="collapsible" data-collapsed="true">
<h3>
July 2012
</h3>
<div data-role="collapsible-set" data-theme="" data-content-theme="">
<div data-role="collapsible" data-collapsed="true" onclick="getLogTime(); this.onclick=null">
<h3>
July 5
</h3>
<div data-role="collapsible-set" data-theme="" data-content-theme="">
<div data-role="collapsible" data-collapsed="true" onclick="getLogData(); this.onclick=null">
//Heading I'm trying to change
<h3 id=time1>
</h3>
<div>
<p id="logFortime1">
</p>
</div>
</div>
<div data-role="collapsible" data-collapsed="true">
<h3>
12:47 pm
</h3>
</div>
</div>
</div>
<div data-role="collapsible" data-collapsed="true">
<h3>
July 6
</h3>
</div>
</div>
</div>
<div data-role="collapsible" data-collapsed="true">
<h3>
August 2012
</h3>
</div>
</div>
<a data-role="button" data-transition="slide" href="#page21">
Graphs
</a>
</div>
</div>
見出しを変更するはずの関数:
function getLogTime() {
$('#time1').text('Time')
}
編集:
= を追加したため、ヘッダーのテキストは変更されますが、スタイルと折りたたみ可能なメニューの内容はすべて失われます。