單擊錨點標記時,將顯示「anotherDiv」。獲取隱藏文本並將其放在div標記中
使用jQuery,我希望能夠在每個li onClick中獲取描述,並將其插入到「anotherDiv」區域,該區域同樣可以在錨點標記的onClick上看到。說明文字最初設置爲不顯示任何內容。
<style>
.desc{
display:none;
}
#anotherDiv{
display: none;
}
</style>
<li style="overflow: hidden; float: none; width: 158px; height: 125px;">
<a onClick="return addPlayer(952541791001, 661361792001, 600, 320)" id="no8" class="video-pop">
<img width="132" height="75" alt="" src="image.jpg">
</a>
<div class="label">The label goes here......</div>
<div class="desc">The description goes here.....</div>
</li>
<li style="overflow: hidden; float: none; width: 158px; height: 125px;">
<a onClick="return addPlayer(952541791001, 661361792001, 600, 320)" id="no10" class="video-pop">
<img width="132" height="75" alt="" src="image.jpg">
</a>
<div class="label">The label goes here......</div>
<div class="desc">The description goes here.....</div>
</li>
-------------------------------------------------------------
<div id="anotherDiv"></div>
獲得它的榮譽! – neelmeg 2012-02-07 21:45:35
確保你在你的答案中發佈你的代碼。這樣未來的訪客可以從你的知識中受益。 – mrtsherman 2012-02-07 22:14:24