假设文档中有4个标签,我希望单击时背景变为白色,但是当我单击另一个标签时,前一个标签应该恢复为默认值(不使用添加类或删除类)
https://s25.postimg.org/kb1m0re0f/screenshot_9.png
<header>
<label for="slide_trigger1">
<i class="fa fa-dot-circle-o" aria-hidden="true"></i>
</label>
<label for="slide_trigger2">
<i class="fa fa-dot-circle-o" aria-hidden="true"></i>
</label>
<label for="slide_trigger3">
<i class="fa fa-dot-circle-o" aria-hidden="true"></i>
</label>
<label for="slide_trigger4">
<i class="fa fa-dot-circle-o" aria-hidden="true"></i>
</label>
</header>
<script>
$(document).ready(function(e) {
$('label').click(function() {
$(this).css({"background":"#fff","color":"green","border-radius":"100%" });
});
});
</script>