Silent failures such as bad selectors are annoying time-wasters. safeQuery warns you when jQuery calls return zero elements, and when
attr calls return undefined.
Try the following in the console:
Or, try this one:
Tested with jQuery 1.7.2 and should work on all browsers. Just add the safeQuery script after loading jQuery.
Download safeQuery here.
By the way, you can also load it as a bookmarklet. Just drag the following link to your bookmarks bar: safeQuery