当我将鼠标悬停在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