Is there a jQuery plugin that can write out when a selector returns 0 elements for troubleshooting?
I know the use .length- I look from the level of observation / analysis / diagnostics, and not at the code level. I do not want to bet .lengthon all my code.
To enter the code, let's say I have a complex selector
$('#someComplex selectorHere')...
in another part of the code, I would like to know that jQuery returns 0 for this selector.
function onFailedSelector(selectorString) {
console.log("Failed to select "+selectorString);
}
In context: we just had a lot of errors that came up thanks to the ASP.NET naming convention, and it would be useful to know which ones were broken.
source
share