How can I select all elements inside .content but not .bts? Here is my code. I'm using the not() function to exclude .bts but it's not working. What should be done?
$('.content').not('.bts').click(function() {
alert("hit");
});
.content {
height: 100%;
width: 100%;
}
p {}
.bts {
background: blue;
height: 100px;
width: 100px;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="content">
<p>test</p>
<div class="bts">bts</div>
</div>