I am dynamically creating DIV elements and using jQuery resizeable handles on them.
Is there a way to show the handles on click or hover, and then hide them when clicking outside the relevant div?
$('.resizable').on('click', function() {
$(this).addClass('focus');
});
$(document).on('click', function() {
if (!$(e.target).closest('.resizable').length) {
$('.resizable').removeClass('focus');
}
});