Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

5
  • 14
    How often do you find yourself calling $() with an empty object as an argument?
    – nnnnnn
    Commented Dec 22, 2014 at 11:24
  • @nnnnnn Actually never (I don't use jQuery anymore). But I guess 3 years ago I had a case of exposing an API that would take a selector and return the number of elements for that selector. If another dev would pass in an empty object, it would incorrectly respond with 1.
    – Oleg
    Commented Dec 22, 2014 at 15:03
  • 4
    Why on earth would you pass an empty object {} to $()?
    – ohmu
    Commented Mar 26, 2015 at 15:46
  • 9
    @cpburnz why do you ask me? I was just an API provider... People pass all kinds of stupid things to APIs.
    – Oleg
    Commented Mar 26, 2015 at 15:48
  • 4
    Just noticed, the jquery issue thread that @FagnerBrack referenced was updated shortly after his comment; it looks like it's not going away after all. Commented Apr 18, 2016 at 21:09