I am currently working on making all the modals draggable on my website. However, there are certain modals with a class of .fullscreen
that I do not want to be draggable.
The issue I'm facing is that I can't figure out how to exclude the modals with the .fullscreen
class because they share the same parent element .modal-dialog
.
Despite trying various selectors, I have been unsuccessful in achieving this.
const $modal = $('.modal');
$(".modal-dialog:not(.modal.fullscreen)", $modal).draggable({
handle: '.modal-header'
});
<div id="employee-modal" class="modal fullscreen dark advanced-search show">
<div class="modal-dialog">
<div class="modal-content">
....
</div>
</div>
</div>