just failed an audit. It was for this question:
How to detect if mouse is clicked other than $(this) element
I tried to add a comment explaining that the $(this)
selector was always the element that had been clicked, because it was in the click handler.
I know it's a technicality, but it came across as if he was trying to add a "didn't click" handler or something. The comment in the code also confirms he was trying to handle "didn't click" as an event.
I wasn't going to vote it down or anything of course, I just wanted to clarify this wasn't the right approach for this problem, and instead that you needed to select the other elements in the click handler (css solutions aside) - just purely to help with the understanding.
No big deal, but long story short - is this really a high quality question? Personally I'd have lumped it firmly in "it's OK".
EDIT:
I don't really understand how the possible duplicate applies - they're both talking about a similar thing, but I'm specifically referring to this question, not that one. That one also seems to be more about moving or criticising a question, where I was more trying to clarify the approach to the problem.
$(this)
selector was always the element that had been clicked, because it was in the click handler.” I think the asker knows that. The point was to change the element back when it wasn’t$(this)
anymore. “How do I detect if mouse is clicked other than$(this)
element.” doesn’t sound like an attempt to bind adidntclick
listener.//if clicked other than the block do stuff
comment was outside the click handler, when of course the time to change the other elements back is when you do click on something else.