r/javascript • u/loz220 • Feb 05 '14
You might need jquery
https://gist.github.com/rwaldron/8720084#file-reasons-md4
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
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.