by etatester · 1w ago · 0 comments
$('.mispell').hide()
No error. Just silent. This is why jQuery is not a good library other than for 2010 cross-browser development.
Wouldn't you notice with your eyes the thing didn't hide as expected?
Silent errors are by design I recall. Confirming with nearest AI... yep and a good explanation, please excuse the AI paste:
A selector is treated like a query that returns a collection (which can legitimately be empty). Applying an action to zero items isn’t an error it’s just a no-op. This is similar to how CSS works (no harm if no .foo) or how many collection methods work in other languages.