If you are using just the basic JQuery features you could consider Zepto instead, so a smaller download but still giving you the abstraction you desire.
You Don't Need JQuery
41–50 of 201 posts
Re: You Don't Need JQuery
#42That alone is enough reason to use jQuery and not having to bother.
Re: You Don't Need JQuery
#43I have been considering a project where for various reasons it would be much better to avoid JQuery, and I realized that I had no idea how to do some common things without JQuery. This is a well-organized guide.
It would be even better if he took out the three sentences after every section that just say, over and over again, "So why would you use JQuery, isn't this just as good?"
Who cares, sometimes I agree sometimes I don't, and the boilerplate argument repeated over and over sounds whiny and gets in the way of the actual useful information OP has to impart.
If you have your own external reasons to consider doing without JQuery (as I do), then an _honest_ assessment of where you are likely to have the most trouble would be more useful, than just repeating "Really, you're an idiot if you think you need JQuery" over and over again.
Still, useful documentation, thanks.
Re: You Don't Need JQuery
#44Re: You Don't Need JQuery
#45Every time I try to build something without jQuery, I regret it. Not because of selectors, that's (sometimes) easy to do for lots of (basic) selectors. Not because of DOM manipulation, as long as you're willing to sacrifice simplicity and readability, you can build iterative loops to modify a collection of HTML elements. No, it's the unexpected things that cause me pain. Want to use event handlers on dynamically gene…
There are other libraries though which provide (IMHO better) implementations of each of those things. jQuery has been around for ten years and has to remain backwards compatible. It's just not possible for it to be the best implementation of Promises, or AJAX or any of the other individual things it does. Real bundling with tools like Browserify is making it more and more feasible to use single-purpose libraries inst…
Thankfully we only support IE9+ where I work, so I grab the latest 2.x version these days.
[0] - http://blog.jquery.com/2013/04/18/jquery-2-0-released/
Re: You Don't Need JQuery
#46Here's a list of DOM bugs in browsers that jQuery works around: https://docs.google.com/document/d/1LPaPA30bLUB_publLIMF0Rlh... Pretty sure they're not all fixed, and this is just the ignorance du jour.
It's this stupid "you're not a real developer unless you're twiddling bits on your hard drive with a magnet" mentality that I absolutely despise.
Re: You Don't Need JQuery
#47Every time I try to build something without jQuery, I regret it. Not because of selectors, that's (sometimes) easy to do for lots of (basic) selectors. Not because of DOM manipulation, as long as you're willing to sacrifice simplicity and readability, you can build iterative loops to modify a collection of HTML elements. No, it's the unexpected things that cause me pain. Want to use event handlers on dynamically gene…
Basically you import everything you need and only what you need. Need extend? No prob: http://microjs.com/#extend - just pick one. And with browserify and npm literally everything you need to do to include a library in your project is a single command, so having to include "that many libraries" is not really a problem.
I'm a huge fan of having many little libraries instead of a few big ones, and JS - both on the backend and frontend - makes this possible to the bigger extent than most other environments.
Re: You Don't Need JQuery
#48Still reading through but it mentions, IE7 when, as I've found out recently, going to a 2.x jQuery release will break IE8 functionality which is still used within organizations either as the actual browser or through compatibility mode. I didn't care for the format of the page but do like the author's tone and points so far. I think a lot of the issues people have with jQuery is that (as the article mentions) it's be…
There are two parallel tracks of JQuery maintained, with _identical functionality_, one which supports IE8 and less, one which doesn't.
JQuery team is supporting both. If they don't behave identically, that's a bug. If you don't need IE8 or less support, you can use the smaller higher-performance JQuery that doesn't support IE8. If you do need IE8 or before you use the other variant.
Your code remains identical either way.
JQuery still supports IE8 and less, and has announced no plans to stop.
A lot of people are confused about this, and it's made more confusing by their mistakes about version labelling.
At present, these two variants are JQuery 1.x (IE8 no problem), and JQuery 2.x (IE9 and above). There are identical parallel versions of each. 1.11.0 and 2.1.1 have identical functionality. Yes, this is super confusing, so going forward in the future, they will call the old-browser-compat variant "JQuery compat", and the no-old-browsers variant "JQuery", and version numbers will be sync'd.
http://blog.jquery.com/2014/10/29/jquery-3-0-the-next-genera...
At present, the JQuery team is still committed to maintaining identical functionality in an old-browser-compat variant, and a newer no-old-browser variant, sync'd, for the indefinite future. And in fact they recommend the Compat version "for most web sites, since it provides the best compatibility for all website visitors."
They could at some point in the future decide to stop doing so -- they have said they won't do so until usage of older browsers has dropped significantly.
Re: You Don't Need JQuery
#49Still reading through but it mentions, IE7 when, as I've found out recently, going to a 2.x jQuery release will break IE8 functionality which is still used within organizations either as the actual browser or through compatibility mode. I didn't care for the format of the page but do like the author's tone and points so far. I think a lot of the issues people have with jQuery is that (as the article mentions) it's be…
There is a lot of misconceptions here. There are two parallel tracks of JQuery maintained, with _identical functionality_, one which supports IE8 and less, one which doesn't. JQuery team is supporting both. If they don't behave identically, that's a bug. If you don't need IE8 or less support, you can use the smaller higher-performance JQuery that doesn't support IE8. If you do need IE8 or before you use the other var…
Re: You Don't Need JQuery
#50Earlier quoted context omitted.
Life is definitely too short to not be using npm, browserify and React! https://www.npmjs.com/package/browserify https://www.npmjs.com/package/react And then use just what modules you need. All the functionality of jQuery has already been ported to various modules. https://www.npmjs.com/package/extend https://www.npmjs.com/package/promise https://www.npmjs.com/package/serialize-form
> Life is definitely too short to not be using npm, browserify and React! These are all cool things, but sometimes you want to simply make a web page without setting up node and npm and all that jazz. Think of it this way... jQuery is like getting a subset of the most common functions you get by using in browserify, but without requiring a build step!
No, absolutely impossible. That would mean I'd have to actually write JavaScript instead of LiveScript and that would be unbearable... ;)
On a more serious note: yes, node is a bit of an overhead. It may be too much for very simple, one-off projects, but it starts making sense as soon as the project becomes even a little bit more complex.