As in the title. I see that jquery dont have this option included, anyone know how to write it by ourself? But within some area?
Like, i have active area of dropped images, that i can select. But i want them deselect, when clicking inside that area, but not when clicked other divs.
if you need try to imagine photoshop interface. Something like that. You can click the interface but clicking inside empty place inside canvas window (area of images) its deselecting.
Since an element with the class ui-selected
is what makes an item selected you can simply remove it to deselect.
$(document).click(function(event) {
if (!$(event.target).is("#selectable")) {
$('#selectable .ui-selected').removeClass('ui-selected')
}
});