當我將鼠標懸停在H2的鏈接,它變綠:如何使元素在使用jQuery懸停另一個元素時具有「懸停」效果(CSS)?
HTML:
<div class="project">
<a rel="bookmark" title="Permalink to Taiwantalk" href="http://localhost/asylum/?p=6">
<img class="attachment-post-thumbnail wp-post-image" width="278" height="128" title="taiwantalk_thumb" alt="taiwantalk_thumb" src="http://localhost/asylum/wp-content/uploads/2011/07/taiwantalk_thumb.png">
</a>
<h2>
<a rel="bookmark" title="Permalink to Taiwantalk" href="http://localhost/asylum/?p=6">Taiwantalk</a>
</h2>
<p>Design, HTML, CSS, Wordpress</p>
</div>
CSS:
#showcase h2 a:hover {
color: #682 !important;
}
我想,當我將鼠標懸停在圖片鏈接太H2變綠。
我認爲jQuery是要走的路。有什麼建議麼?
你能給我舉一個如何做到這一點與jQuery的例子嗎? – alexchenco