I have created a multiselect dropdown, and using "on blur" event but am unable to click on checkbox because when I click on checkbox it's hiding it's list. how to solve that.
$('.select-text-box').on('click', function() {
$(".mylist").fadeIn(300, function() {
$(this).focus();
});
});
$(".mylist").on('blur', function() {
$(this).hide()
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0/jquery.min.js"></script>
<div class="select-text-box" style="background-color: red; padding:20px; width:150px; border-radius: 20px;">Please Select</div>
<div class="mylist" style="display: none; height: 200px; width:300px; background:red;" tabindex="-1">
<ul>
<input type="checkbox" name="">name
<input type="checkbox" name="">class
</ul>
</div>