@nsrosenqvist/jquery.exists

Simple jQuery plugin to test whether an element exists

Stats

StarsIssuesVersionUpdatedCreatedSize
@nsrosenqvist/jquery.exists
001.0.23 years ago3 years agoMinified + gzip package size for @nsrosenqvist/jquery.exists in KB

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

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.