jquery-debug
A plugin that makes jQuery throw an error, rather than fail silently, when a selector returns no results.
What is this useful for ?
Save tons of time and frustration debugging jQuery!
Install
Install with npm
npm install --save jquery-debug
Check out this article for more information on how to use jQuery plugins with npm.
Usage
demo DIV
Here's the error message you would see in the browser console.
Error: The jQuery selector 'p' was not found in the context of '#document'.
For a live example, check out the CodePen.
Contributing
See the CONTRIBUTING Guidelines
License
MIT © Jonathan Kemp