JSFiddle - React, Tailwind, and code Playground
by SimoneGianni
HTML
<html>
<body>
<div id="a">A div</div>
<div id="b">B div</div>
</body>
</html>
JavaScript
jQuery.fn.preinit = jQuery.fn.init;
jQuery.fn.init = function( selector, context, rootjQuery ) {
this.preinit(selector,context,rootjQuery);
if (this.length == 0) alert(selector + " on " + context + " returned 0 elements");
}
jQuery.fn.init.prototype = jQuery.fn;
$(function() {
$('#a');
$('#notfound');
});