🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

jquery-debug

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jquery-debug

A plugin that makes jQuery throw an error, rather than fail silently, when a selector returns no results.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
3
-40%
Maintainers
1
Weekly downloads
 
Created
Source

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

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>demo</title>
  <script src="https://code.jquery.com/jquery-3.0.0.js"></script>
</head>
<body>

<div>DIV</div>

<script>
var element = $('p').debug();
</script>

</body>
</html>

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

Keywords

jquery-plugin

FAQs

Package last updated on 13 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts