jQuery is still quite relevant and helpful. Despite the hype with newer libraries, jQuery is used on 73% of _all_ websites. https://w3techs.com/technologies/overview/javascript_library... I often tell myself, ok, I'm going to just use vanilla JS for this one, but compared to jQuery, it's way too verbose. Try doing $('.my-elements').show() in vanilla js. The problem is the jQuery foundation has become too bureaucratic…
The biggest benefit that I've found for jQuery (and a lot of JS libraries) over vanilla is browser compatibility. I generally don't have time to check compatibility of every mildly complex piece of JS I write. Using a library often solves that issue
The Future of JQuery UI and JQuery Mobile
31–40 of 97 posts
Re: The Future of JQuery UI and JQuery Mobile
#32Earlier quoted context omitted.
Disagree with this somewhat. I think jQuery still has a place in web app development, especially when you need something done fast. You just need to be careful not to over-bloat your js. jQuery has helped my team get stuff done really fast more than a few times in the last couple of months.
> I think jQuery still has a place in web app development, especially when you need something done fast I never got this argument and am curious - what exactly does jQuery do faster? I've left it behind for CSS animations and native Dom selectors years ago and haven't looked back.
Re: The Future of JQuery UI and JQuery Mobile
#33Seems like most of the comments on here pertain to the relevance of jQuery, rather than jQuery UI and jQuery Mobile. Sure most sites still use jQuery, but do very many use jQuery UI anymore? jQuery Mobile? I've never seen a project use jQuery Mobile.
For instance a gas comapny’s customer information site, and the goal was to have html that could be displayed on post wap phones or super old blackberries.
It’s really less to do super fancy stuff, and more to have forms that don’t break on super exotic browsers we didn’t even know existed.
Re: The Future of JQuery UI and JQuery Mobile
#34jQuery is still quite relevant and helpful. Despite the hype with newer libraries, jQuery is used on 73% of _all_ websites. https://w3techs.com/technologies/overview/javascript_library... I often tell myself, ok, I'm going to just use vanilla JS for this one, but compared to jQuery, it's way too verbose. Try doing $('.my-elements').show() in vanilla js. The problem is the jQuery foundation has become too bureaucratic…
That's actually a good example. My gut feeling was simply to write the following. document.getElementsByClassName("my-class")[0].style.display = 'block'; The PlainJS site mentions that it's not quite that simple and suggests writing your own show() and hide() functions if you're avoiding jQuery. https://plainjs.com/javascript/effects/hide-or-show-an-eleme...
Re: The Future of JQuery UI and JQuery Mobile
#35Earlier quoted context omitted.
The biggest benefit that I've found for jQuery (and a lot of JS libraries) over vanilla is browser compatibility. I generally don't have time to check compatibility of every mildly complex piece of JS I write. Using a library often solves that issue
That was a relevant answer couple of years ago. These days you can achieve most with having a properly setup IDE-intellisense ( e.g. WebStorm ).
Re: The Future of JQuery UI and JQuery Mobile
#36Considering current trends for creating complex applications for the client I do not believe jQuery has much of a future anyway. It had been good while it lasted, I used to like jQuery a lot until better tools came along. These days libraries for DOM manipulation seem not only obsolete but also standing in a way of focused and efficient development. Let jQuery rest in peace and be remembered for its past greatness.
Re: The Future of JQuery UI and JQuery Mobile
#37Earlier quoted context omitted.
That's actually a good example. My gut feeling was simply to write the following. document.getElementsByClassName("my-class")[0].style.display = 'block'; The PlainJS site mentions that it's not quite that simple and suggests writing your own show() and hide() functions if you're avoiding jQuery. https://plainjs.com/javascript/effects/hide-or-show-an-eleme...
To make that work for all elements of that class, you could rewrite it as document.querySelectorAll('.myclass') .forEach(el => el.style.display = 'block') The jQuery is still shorter, but the vanilla js is definitely manageable.
Re: The Future of JQuery UI and JQuery Mobile
#38Earlier quoted context omitted.
That was a relevant answer couple of years ago. These days you can achieve most with having a properly setup IDE-intellisense ( e.g. WebStorm ).
Does that really solve the issue though? All the IDE can tell you is that some browser version doesn't support what you're doing, it doesn't write the polyfill for you.
Re: The Future of JQuery UI and JQuery Mobile
#39Earlier quoted context omitted.
To make that work for all elements of that class, you could rewrite it as document.querySelectorAll('.myclass') .forEach(el => el.style.display = 'block') The jQuery is still shorter, but the vanilla js is definitely manageable.
Unfortunately, querySelectorAll returns a NodeList, not an Array. So you cannot use forEach() on it.
https://developer.mozilla.org/en-US/docs/Web/API/NodeList/fo...
Re: The Future of JQuery UI and JQuery Mobile
#40Earlier quoted context omitted.
Unfortunately, querySelectorAll returns a NodeList, not an Array. So you cannot use forEach() on it.
NodeList also implements forEach: https://developer.mozilla.org/en-US/docs/Web/API/NodeList/fo...