Say I make a mistake when I'm trying to find an element and I make a typo, like $('lsdkfj')
.
Instead of jQuery returning me an empty array, I'd like to return an error message in the console, like
"The selector 'lsdkfj' cannot be found"
. What is the best way to go about doing this?
相关问题
- How to fix IE ClearType + jQuery opacity problem i
- jQuery add and remove delay
- Include empty value fields in jQuery .serialize()
- Disable Browser onUnload on certain links?
- how to get selected text from iframe with javascri
Like this: