【发布时间】:2016-02-12 01:50:06
【问题描述】:
当我切换到任何卡时,我无法选择返回默认卡,为什么?
HTML
<div class="profiles_container">
<div class="profile_card_selected">
Default
</div>
<div class="profile_card">
First
</div>
<div class="profile_card">
Second
</div>
<div class="profile_card">
Third
</div>
</div>
JS
$(".profile_card").click(function(){
$('.profiles_container').find(".profile_card_selected").removeClass("profile_card_selected").addClass("profile_card");
$(this).removeClass("profile_card").addClass("profile_card_selected");
});
【问题讨论】:
标签: jquery