Eh. Everyone hates on jQuery, but for most informational sites that's really all you need for basic interaction. Speed really isn't bad, and it's so straightforward that it's hard to mis-use at this point. I seem to have way more issues with newer frameworks/SPA if I'm not using chrome with no extensions. Makes me nervous dealing with important stuff like banking or government sites.
>> Eh. Everyone hates on jQuery, but for most informational sites that's really all you need for basic interaction. The point seems to be that you don't even need that any more, so just get rid of it. Not sure why people latch onto cruft so much and defend its continued use. On the performance side they cite 10 percent improvement, which doesn't sound like much to a lot of people. But remember that performance gains/…
Gov.uk drops jQuery from their front end
41–50 of 458 posts
Re: Gov.uk drops jQuery from their front end
#42Earlier quoted context omitted.
For basic interaction, you don't need anything but vanilla JS. Browsers have come a long way since the days where jQuery was almost necessary to deal with all of the minor differences/bugs in various browsers.
I'll admit I'm a bit out of practice with the state of vanilla JS, but it seems like you'll be re-inventing the wheel for simple stuff. Like a collapsible section that's lightly animated. I worry too about people not considering accessibility. A lot of my bugs day to day is not being able to tab into things like hover menus or being able to activate buttons because someone forgot to consider correct event callbacks.…
Re: Gov.uk drops jQuery from their front end
#43Earlier quoted context omitted.
To add: jQuery is a pretty huge library for what it does. Talking both bundle size and execution speed. Not that the latter is noticeable for most cases, but it's still a cost. The question is: What for? The primary use case for it has been cross browser compatibility plus a bit of sugar. The former is _gone_ and the latter is easily replaced with a few lines of JS. Then there is an ecosystem of libraries and compone…
30kb minified and gzipped! Less than most hero images. It's a nice API for simple stuff. I think if you strip out the AJAX support it can get extremely tiny.
Re: Gov.uk drops jQuery from their front end
#44Re: Gov.uk drops jQuery from their front end
#45Earlier quoted context omitted.
>> Eh. Everyone hates on jQuery, but for most informational sites that's really all you need for basic interaction. The point seems to be that you don't even need that any more, so just get rid of it. Not sure why people latch onto cruft so much and defend its continued use. On the performance side they cite 10 percent improvement, which doesn't sound like much to a lot of people. But remember that performance gains/…
For AJAX, jQuery is still simpler than vanilla JS.
Re: Gov.uk drops jQuery from their front end
#46Eh. Everyone hates on jQuery, but for most informational sites that's really all you need for basic interaction. Speed really isn't bad, and it's so straightforward that it's hard to mis-use at this point. I seem to have way more issues with newer frameworks/SPA if I'm not using chrome with no extensions. Makes me nervous dealing with important stuff like banking or government sites.
For basic interaction, you don't need anything but vanilla JS. Browsers have come a long way since the days where jQuery was almost necessary to deal with all of the minor differences/bugs in various browsers.
const $ = document.querySelector.bind(document);Re: Gov.uk drops jQuery from their front end
#47Earlier quoted context omitted.
I'll admit I'm a bit out of practice with the state of vanilla JS, but it seems like you'll be re-inventing the wheel for simple stuff. Like a collapsible section that's lightly animated. I worry too about people not considering accessibility. A lot of my bugs day to day is not being able to tab into things like hover menus or being able to activate buttons because someone forgot to consider correct event callbacks.…
Collapsible section? https://developer.mozilla.org/en-US/docs/Web/HTML/Element/de... There's some CSS transition stuff you can add to that to make it lightly animated: https://css-tricks.com/how-to-animate-the-details-element/ Yeah, jQuery might make some things easier, but when possible, using native HTML elements makes things even easier,
Re: Gov.uk drops jQuery from their front end
#48Re: Gov.uk drops jQuery from their front end
#49Earlier quoted context omitted.
I'll admit I'm a bit out of practice with the state of vanilla JS, but it seems like you'll be re-inventing the wheel for simple stuff. Like a collapsible section that's lightly animated. I worry too about people not considering accessibility. A lot of my bugs day to day is not being able to tab into things like hover menus or being able to activate buttons because someone forgot to consider correct event callbacks.…
In 2020, a collapsible section is a matter of adding / removing a classname and a CSS animation; there's a few ways to do so, using jQuery is one, but you don't need thousands of lines of a JS library (network bandwidth + JS interpretation) to achieve that.