0
讓我們來看看我能否解釋這一點。將內容添加到製表符/下拉列表
我有下面的代碼,使得取決於所點擊的選項卡上的某些內容顯示:
<div class="container">
<ul class="no-list-style">js
<li class="active information-tab">
<div class="information-dropdown"><a rel="info" href="#">{{ 'Information' | t }}</a>
</div>
</li>
<li class="active program-tab">
<div class="program-dropdown"><a rel="info" href="#">{{ 'Program' | t }}</a>
</div>
</li>
</ul>
</div>
我已經添加了程序選項卡嘍。我需要的時候來使用此代碼被加入這一計劃選項卡中顯示的內容:我知道某處一個div
<script type="text/javascript">// <![CDATA[
$('#addedDiv').contents().filter(function() { return this.nodeType == 3 }).each(function() { this.parentNode.innerHTML = this.textContent.replace('','This is the program'); });
// ]]></script>
ID爲「addedDiv」需要增加這一點,但在何處以及如何?
感謝您的評論。但是我只需要在程序標籤被使用時看到的文本「這是程序」。我在哪裏放置代碼'
只需將
[這是它應該發生的地方](http://www.photographycoursetour.com/japan-tour-beginners-course.html#)請參閱左側的「information」,「program」,「testimonials」標籤視頻上方的網頁。使用程序標籤時,文本「這是程序」應該顯示在標籤下方,其他內容也會顯示在使用其他兩個標籤時。 – Eddy