你好stackoverflow社區, 我在psd上練習html css我有 現在它是我點擊一個按鈕和一個列表必須更改爲其內容的部分 這裏是一個圖像,可能會澄清事物 http://prntscr.com/d9al1x ,這裏是我的網站鏈接,如果你想檢查元素www.sheetmulching.com/karios列表更改onclick
這裏是我的html
<div class="content_rightside">
<a id="spieler" href="javascript:;"><img src="images/spieler.png" style="display:inline-block;"></a>
<a id="gilde" href="javascript:;"><img src="images/gilde.png" style="display:inline-block;"></a>
<div class="playerslists">
<ul>
<li><a href="javascript:;"><span class="number">1</span><span class="playername">Spieler</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">2</span><span class="playername">Spieler</span><span class="score"><img src="images/Shinsoo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">3</span><span class="playername">Spieler</span><span class="score"><img src="images/Jinno.png"></span></a></li>
<li><a href="javascript:;"><span class="number">4</span><span class="playername">Spieler</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">5</span><span class="playername">Spieler</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">6</span><span class="playername">Spieler</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">7</span><span class="playername">Spieler</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">8</span><span class="playername">Spieler</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">9</span><span class="playername">Spieler</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">10</span><span class="playername">Spieler</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
</ul>
</div>
<div class="guildlist" style="display:none;">
<ul>
<li><a href="javascript:;"><span class="number">1</span><span class="playername">Gilde</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">2</span><span class="playername">Gilde</span><span class="score"><img src="images/Shinsoo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">3</span><span class="playername">Gilde</span><span class="score"><img src="images/Jinno.png"></span></a></li>
<li><a href="javascript:;"><span class="number">4</span><span class="playername">Gilde</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">5</span><span class="playername">Gilde</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">6</span><span class="playername">Gilde</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">7</span><span class="playername">Gilde</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">8</span><span class="playername">Gilde</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">9</span><span class="playername">Gilde</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
<li><a href="javascript:;"><span class="number">10</span><span class="playername">Gilde</span><span class="score"><img src="images/Chunjo.png"></span></a></li>
</ul>
</div>
<a href="javascript:;"><img src="images/alles.png"></a>
</div>
</div>
和我的CSS
.content_rightside { width: 270px;
float: left;
margin-left: -10px;
margin-top:-550px;}
.playerslists{ font-family:"Times New Roman"; margin-top:5px; font-size:15px;}
.playerslists ul li{ margin:8px 0px; padding: 5px 10px; border-bottom:solid 1px transparent}
.playerslists ul li:hover{ background:#27304f; }
.playerslists .number{ float:left; margin-right: 15px; color:#FFFFFF; }
.playerslists .playername{ color:#FFFFFF; }
.playerslists .score{ float:right; color:#FFFFFF; margin-top:-10px;}
.playerslists a{ text-decoration:none;}
我認爲這可以在jQuery中完成,但我對此不夠了解! 當spieler按鈕點擊時,它應該顯示id球員列表 ,當點擊gilde按鈕時,它應該顯示gildelist 在此先感謝。
ok之前我加了這個 但沒有任何反應我也改變類ID –
是的,如果你之前插入此,DOM的內容將不會被加載。看看我提供的參考資料。您需要在