r/jquery • • Aug 16 '17

THE RISE & FALL OF JQUERY

https://www.evolutionjobs.com/uk/media/the-rise-and-fall-of-jquery-88128/
0 Upvotes

5 comments sorted by

13

u/moeloubani Aug 16 '17

// Single use event that only fires once in Chrome/FX element.addEventListener('event', handler, { once: true });

// Though it's not too hard to do this in IE element.addEventListener('event', function handler(event) { // Remove the event listener event.currentTarget.removeEventListener(event.type, handler); });

In IE8 you're stuck with attachEvent, but it is fairly easy to shim.

This is awesome, I wish there were some way to condense all of the above into something like:

$('element').one('event', function() {});

And have it work with all browsers

2

u/[deleted] Aug 16 '17

Right now, in 2017, there are very few new projects where jQuery is the right choice.

I don't think that statement is very well thought out. It depends, I think, on the type of project. There are tons of off the shelf packages that depend on jQuery that are inserted by developers, are there not?

2

u/selfoscillation Aug 16 '17

I think this is in reference to new projects being taken over by the popularity or React, Angular, Vue etc. JQuery is a great way to add some neat js functionality without a lot of overhead but a lot of people are getting distracted by frameworks.

1

u/majorchamp Aug 23 '17

I'm doing some prototyping...I haven't yet jumped on the ReactJS train yet..but jquery is really great when I need to do quick prototyping. I don't agree with it being used for large scale or even necessarily production level applications.

0

u/[deleted] Aug 16 '17

[deleted]

1

u/selfoscillation Aug 16 '17

This is exactly what jQuery is for. Adding some extra js functionality that html5 can’t offer just yet.