News for hackers. Stuff that matters.
Re:You Don't Need JQuery by jbeja on Tuesday December 16, 2014 @06:47PM (#8760300)
Actually since forever, you don't need to use document.getElementById("x") in any case. You just by putting the id to the element, it is already available to you referencing it by such id.

So this:

    document.getElementById('foo').className = 
          document.getElementById('foo').className.replace(/^bold$/, '');
Can become to this:

    foo.classList.remove("x");
And is miles away more performant than slow jQuery.
Re:You Don't Need JQuery by dmethvin on Tuesday December 16, 2014 @06:53PM (#8760328)
That won't work on Android 2.x, which doesn't support `.classList`. Performance isn't even an issue here since changing classes will cause a reapply-styles and layout.
Re:You Don't Need JQuery by jbeja on Tuesday December 16, 2014 @06:57PM (#8760344)
I care as much for Android 2.x as ie below 10.
Re:You Don't Need JQuery by barrkel on Tuesday December 16, 2014 @07:02PM (#8760364)
And probably 80% of our startup's revenue comes from banks stuck using IE8.
Re:You Don't Need JQuery by pain on Tuesday December 16, 2014 @07:11PM (#8760391)
Is there a http://mapthebanks.com / https://news.ycombinator.com/item?id=8753565 for tracking technology organizations use?
Re:You Don't Need JQuery by mikeryan on Wednesday December 17, 2014 @12:28AM (#8761205)
Note the Jquery ticket for this issue can be tracked link below. In most cases Jquery will try to use to native implementations this is the ticket in this case they've never found it to be "miles away more performant".

http://bugs.jquery.com/ticket/5087