这是html:
<div class="messages">
<div class="conflict">
<div class="alert alert-info">
Conflict
</div>
</div>
<div class="account">
<div class="alert alert-info">
Account
</div>
</div>
</div>
这是CSS:
.new_inquiry > form > .messages > .conflict, .account { display: none;}
这是jquery代码:
$('#inquiry_theme').change(function(){
if($('#inquiry_theme').val() == 'Conflict with the buyer/seller...') {
$('.new_inquiry form .messages .conflict').show();
}
});
如果打开了其他 div,则何时触发$('.new_inquiry form .messages .conflict').show();
,如果类不同,我想隐藏它.conflict