r/javascript • • Feb 05 '14

You might need jquery

https://gist.github.com/rwaldron/8720084#file-reasons-md
0 Upvotes

11 comments sorted by

4

u/BishopAndWarlord Feb 05 '14

I don't mean to be rude but why is this link here? With no comment from the submitter this looks like a karma grab rather than an instructive link for the betterment of the community.

0

u/loz220 Feb 05 '14

Sorry should have mentioned this is a response to : http://www.reddit.com/r/javascript/comments/1wkm2b/you_might_not_need_jquery/ A top post here on r/javascript a couple days ago.

-3

u/adrianmiu Feb 05 '14

Recently there was some promotion for the ideea that "you might NOT need jquery". I'm glad somebody's trying fight back that crap.

4

u/Jeffshaver Feb 06 '14

You may not need jQuery. There is no reason to bash the people that don't need it. The point of the "you may not need jQuery" thing seemed to be, decide on your own if you need it. Don't blindly just add it to your project, like most people do.

-2

u/adrianmiu Feb 06 '14

You missed the point of the original post and my reply.

1

u/Jeffshaver Feb 06 '14

Then I guess I find all of this to be nonsense

0

u/hunyeti Feb 05 '14

yeah, you can't even add two number without jquery, so it's a must!

4

u/rhysbrettbowen Feb 06 '14

Most of these are workarounds for older browsers that have been replaces or are introduced because of the way jQuery works (for instance firefox <20 throwing an error when trying to get at the constructor of some objects). Even then putting a try/catch around in normal code would have covered this without bringing in the whole of jQuery.

Yes, jQuery does smooth over some differences between browsers, but those differences are decreasing and it's not necessary to pull in the whole of jQuery every time you start and application because of an inconsitency you might hit.

You should always develop with the best intentions. Using abstractions in code will allow you to fix any problems that may arise

-2

u/chuyskywalker Feb 06 '14

Using abstractions in code will allow you to fix any problems that may arise

Like, say, $('#id').hide() from a good abstraction library, perhaps jQuery?

2

u/rhysbrettbowen Feb 06 '14

not quite - if you're backing it straight on to jQuery it's an API. When you own the code behind the call it's an abstraction.

2

u/dexygen Software, Simple and Powerful Feb 06 '14

Then again with Angular, you might not