After some conversations on IRC, I was led to believe that this is
simply what jQuery does
This may be unrelated, but some beginners mistakenly view this as failing silently
- $( "#foof" ).hide(); // nothing happens, no element #foof
when the developer really meant to type:
- $( "#foo" ).hide(); // #foo hides
assuming there's no element with an id of foof, therefore jQuery does nothing, by design, as it was asked to call the .hide() method on 0 elements. Of course it's no error to have a query return an empty set and it's no error to call chainable methods on an empty set.
When people begin to grasp this is a feature not a bug, part of the design of jQuery, they may tout jQuery as "always failing silently", and while that may be accurate in some cases, there are a good number (such as this one) that aren't a failure at all, and nothing's being swallowed or hidden.