请参阅此link。
我的问题是:当我点击链接时,我希望.current div
上的<a>
链接(例如<a class="current">
)<a>
和div <style>
会显示比如hover
。
请提前帮助我。
答案 0 :(得分:0)
jQuery的:
$('a[id^="prod"]').removeClass("active");
$(this).addClass("active");
.active
类的CSS:
a[id^="prod"].active {
background: #f7edda;
color: #d2ab67;
text-decoration: none;
}