4 ms·
For #3, I say skip jQuery and go with Vanilla JavaScript ala https://javascript30.com https://javascript30.com Every green browser have pretty good JavaScript
by devNoise 10y ago
For #3, I say skip jQuery and go with Vanilla JavaScript ala https://javascript30.com https://javascript30.com
Every green browser have pretty good JavaScript support. document.getElementById will be your friend.
- marknadal 10y agoThis looks great!! Will have to peek at it more myself. As you can tell, I'm a vanilla fan myself. Although I do think the DOM is still unnecessarily verbose - that aside, `innerText` still is not cross browser, so for that reason alone I recommend jQuery `$("#id").text("foo")` to discourage use of `.innerHTML` :( .
- duderific 10y agoTo my mind, using innerHTML is far better than including a 32K library just to avoid using it.
- Rumudiez 10y agoWhy is innerText not cross browser? According to caniuse it's been in every major version of every popular browser for over a year.[0] [0] http://caniuse.com/#search=innerText http://caniuse.com/#search=innerText
- marknadal 10y agoOh hmmm, I thought I tried it just the other month and it wasn't working. Maybe I hadn't updated IE, but I thought it was the whole Edge/11 split problem. Thanks for correcting me!
- jhall1468 10y agoThis is especially true if you want to apply for a job some day. Programming interviews are going to expect plain old javascript, not a framework-oriented approach. More importantly, jQuery is a tool. Know what you're making before you bother with a tool that makes it easier.
- lazyasciiart 10y agoNot the programming interviews I've been in (on both sides).