I use jquery because I use bootstrap and it requires it for some features I use. I wish that someone would write a drop-in javascript replacement for jquery in the context of bootstrap.
Bling – the $ of jQuery without the jQuery
31–40 of 138 posts
Re: Bling – the $ of jQuery without the jQuery
#32This will make our lives easier :)
Re: Bling – the $ of jQuery without the jQuery
#33Can someone explain the new trend to not use jQuery?
In 2015 most browsers are in much better shape than they were in, say, 2007. A lot of people are mostly targeting users who use up-to-date, standards compliant browsers. They are also often targeting people who use mobiles, which are (for a couple of reasons) much more sensitive to poor JS performance than desktops, and also see a more tangible benefit from small page sizes.
Another advantage to jQuery was making complex JS operations very simple. Modern JavaScript has actually made life much easier[1], meaning that it's often only a little more work to use vanilla Javascript.
Re: Bling – the $ of jQuery without the jQuery
#34Earlier quoted context omitted.
1) Paul Irish is a former jQuery team member and he has blog entries about how much he's learned from reading jQuery's source code, not sure exactly how he's "wrecking jQuery". 2) Semicolons are still in debate amongst the JS community, I don't think there's a consensus on whether they're needed or not and it seems to boil down to personal preferences. 3) This reeks of ad hominem, how exactly is Paul Irish "hipster"?…
> 2) Semicolons are still in debate amongst the JS community, I don't think there's a consensus on whether they're needed or not and it seems to boil down to personal preferences. They are needed. This var func = function(x) { console.log(x); }; func; (42); is different from this var func = function(x) { console.log(x); } func (42)
Re: Bling – the $ of jQuery without the jQuery
#35Note that work is being done to give `NodeList`s the `Symbol.iterator` property so in new browsers it's trivial to use the native DOM with `for(let x of nodeList)` loops making our lives easier. This will make our lives easier :)
Re: Bling – the $ of jQuery without the jQuery
#36Earlier quoted context omitted.
> 2) Semicolons are still in debate amongst the JS community, I don't think there's a consensus on whether they're needed or not and it seems to boil down to personal preferences. They are needed. This var func = function(x) { console.log(x); }; func; (42); is different from this var func = function(x) { console.log(x); } func (42)
They aren't needed at all. Semicolons in JS are optional. Knowledge about how ASI works, on the other hand, is mandatory.
Which becomes really annoying if you just want to quickly concatenate a few files together.
Sure, it's something that you can fix yourself; I'd consider it a common courtesy to include at least one, though.
Re: Bling – the $ of jQuery without the jQuery
#37This does three things: 1. Alias document.querySelectorAll to $. 2. Alias node.on to node.addEventListener. 3. Make NodeList a sub-type of Array (so you can use forEach etc on node lists as you would on arrays). The $ of jQuery also does a few other things, e.g. create HTML elements from text ($(' ') creates a div element with CSS class "foo") and wrap elements in a node list ($(document.body) creates a node list con…
This is not correct. You may say that it wraps or outputs elements in a node list like object but it is not the real deal. If you examine the emitted jQuery objects using instanceof or any other method, you'd see that they are not related to NodeList in any way. They're just generic objects of Object type.
Re: Bling – the $ of jQuery without the jQuery
#38Can someone explain the new trend to not use jQuery?
A lot of developers originally used jQuery as a cross-browser compatibility library when that was still a major concern. Along the way, jQuery has added tons of extra helper functions and wrappers (ie, .ajax(), .post(), event binding helpers, etc). This has been amazing for web development, but it's also been such a major pillar of web development that a lot of front end developers don't actually know what's happenin…
Re: Bling – the $ of jQuery without the jQuery
#39Can someone explain the new trend to not use jQuery?