4

Possible Duplicate:

Why do 90% of people reply to question tagged (and not ) with a jQuery based answer?

Best answer so far :

a tag of jQuery implies that a JavaScript solution would be acceptable, but a tag of JavaScript does not, in any way, imply that a jQuery solution would be acceptable or useful.

5
  • 1
    Although migrated from SO for its topic, this was questioned, high viewed, and power answered in a matter of minutes just like a high rep question on SO itself. May 16, 2011 at 18:43
  • Yeah that's funny XD, I'm new to SO but I love it.
    – sitifensys
    May 16, 2011 at 18:47
  • I think it's worth pointing out that if you get a JQuery answer to your question, but you need a non-JQuery answer because you can't or don't want to use JQuery for whatever reason, you can usually kind of "translate" it into "vanilla" (non-JQuery) JavaScript by reading the docs, and if necessary, the source, for the JQuery functions that are used.
    – Tyler
    May 16, 2011 at 20:03
  • 1
    Because they don't know native JavaScript and know only how to jQuery everything.
    – random
    May 16, 2011 at 21:41
  • You should totally drop what you're doing and use Meta! May 16, 2011 at 23:26

8 Answers 8

8

The reason I personally, albeit only on occasion, answer JavaScript-tagged questions with a jQuery solution is a simple mistake, every now and then I see a question that would be easy (-ish) to solve with jQuery and, for some reason, don't notice that the question didn't feature the jQuery tag.

It is, on this type of occasion, important to remember Hanlon's razor:

Never attribute to malice that which is adequately explained by stupidity.

To answer the implied question in your question's title, which I choose to interpret as 'are JavaScript and jQuery tag-synonyms for each other?' the answer is 'no,' a tag of jQuery implies that a JavaScript solution would be acceptable, but a tag of JavaScript does not, in any way, imply that a jQuery solution would be acceptable or useful.

11
  • +1 I've done that a few times as well.
    – user147519
    May 16, 2011 at 18:31
  • Love this answer
    – sitifensys
    May 16, 2011 at 18:32
  • And on the last paragraph you added, very well put. I'd give another + just for that if I could.
    – user147519
    May 16, 2011 at 18:36
  • @patrick, I think everyone active in javascript and jquery has done it at least a couple of times =) and thanks! May 16, 2011 at 18:39
  • @sitifensys: ... awwww, shucks... =D May 16, 2011 at 18:39
  • I don't have enough rep to add a point. But this is exactly the kind of answers I looked for.
    – sitifensys
    May 16, 2011 at 18:41
  • @sitifensys: you should be able to vote up, with >15 rep. Not that you should feel obliged to do so, that was just a pointer at the priveleges to show when you can get to do things. May 16, 2011 at 18:43
  • This is my +1 for you David XD
    – sitifensys
    May 16, 2011 at 18:44
  • @sitifensys: thank you, kindly! :) May 16, 2011 at 18:45
  • @david you do deserve it :).
    – sitifensys
    May 16, 2011 at 18:52
  • 1
    +1 Oh God, I've done this so many times. And then felt a prize chump immediately afterwards. May 16, 2011 at 21:37
9

Because jQuery makes it much easier to write Javascript.

Answerers generally do not have much time and would prefer to write a single line that uses jQuery and will work in all browsers than to write 10 lines that don't use jQuery and won't work in IE.

The bigger issue is askers who ask questions about their "jQuery code" which is actually a simple (but wrong) piece of pure Javascript.

5
  • My question is for askers who ask javascript related things, not jquery. :)
    – sitifensys
    May 16, 2011 at 18:29
  • If you don't want jQuery answers, say so (or use a tag for a different library)
    – SLaks
    May 16, 2011 at 18:30
  • 2
    That's the point of my question. Why people answer javascript only tagged question with jquery-ish answers.
    – sitifensys
    May 16, 2011 at 18:34
  • 1
    @sti: Because we don't have time to write non-jQuery answers.
    – SLaks
    May 16, 2011 at 18:35
  • 1
    +1 for mentioning JS not working in IE. May 16, 2011 at 19:25
5

They are very different things.

  • Javascript is a programming language
  • JQuery is a javascript library which has a very high adoption rate amongst web developers using javascript
1
  • 2
    I do know what jquery is :), I just asked why people in stack overflow tend to answer javascript only tagged question with jquery shortcuts.
    – sitifensys
    May 16, 2011 at 18:24
2

It's simple: Because jQuery is the answer for a lot of Javascript questions ;-)

1

jQuery is a framework written in javascript.

1
  • 3
    -1, this answers the title (which is a joke) and not the actual question
    – Pops
    May 16, 2011 at 21:38
1

Because jQuery is a wildly popular Javascript library which hides lots of JS boilerplate and has tons of plugins for pretty much anything.

1

I think that there are a lot of people who simply don't know how to work outside of jQuery. That's fine, but I think jQuery does sometimes get over-recommended.

I think that if you ask JavaScript questions, and would prefer non-library answers, you should probably specify that in your question or use the no-jquery tag.


EDIT: The suggestion to use a not tag wasn't right. Tags are meant to positively categorize, not negatively.

2
  • 4
    Don't use that tag, please. If you you absolutely don't want a jquery answer to a question, say so in the question - it's part of the question's requirements, not a categorization. If you want to find JavaScript questions that aren't about jQuery, use the -[jquery] search term.
    – Shog9
    May 16, 2011 at 21:27
  • 1
    @Shog9: You're right. no-jquery isn't a proper category. I hereby recant. :o) Although I must say that a no jQuery requirement in the question is sometimes insufficient, though it does give good grounds to vote an answer down. Thanks for your input.
    – user147519
    May 17, 2011 at 0:21
0

No. JQuery is built upon JavaScript.

2
  • 3
    -1, this answers the title (which is a joke) and not the actual question
    – Pops
    May 16, 2011 at 21:38
  • Please restore this. It was part of the migration. May 17, 2011 at 1:13

Not the answer you're looking for? Browse other questions tagged .