我有两个 div 元素如下:
<div class="sc-info" tags="abc mno">
....
</div>
<div class="sc-info" tags="abc xyz">
....
</div>
我想根据标签中存在的值执行 hide() 和 show()。如下所示
$('div.sc-info[tags with "abc"]').hide() // This should hide both divs
$('div.sc-info[tags with "xyz"]').show() //This should show only second one