JSFiddle - React, Tailwind, and code Playground
HTML
<div class="one">
One
</div>
<div class="two">
Two
</div>
CSS
.hide-element{
display: none;
}
JavaScript
function checkBgAudioElement(){
let targetAudioElementCheck = $(document).find(".one");
let targetAddButon = $(document).find(".two");
if(targetAudioElementCheck.length > 0){
targetAddButon.addClass('hide-element');
}
else{
targetAddButon.removeClass('hide-element');
}
}
checkBgAudioElement();