README
jQuery Exists
A jQuery plugin to check whether an element exists and if so run the callback on the element.
Installation
npm install @nsrosenqvist/jquery.exists
Usage
$('.maybe-exists').exists(function() {
$(this).addClass('definitely-exists');
});
if ($('.maybe-exists').exists()) {
alert('exists');
}
License
MIT