Note that there are some explanatory texts on larger screens.

plurals
  1. USTravis Kaufman
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. COTangentially, this is one of my biggest pet peeves as a front-end developer; that people straight up *abuse* jQuery. It is an awesome library and is extremely powerful, but I find that a lot of people use it as an excuse not to have to learn vanilla DOM. This made sense back in the day when you had to deal with IE <9, and still makes sense if you need to support those browsers. But those days are coming to a close, and if all you're using jQuery for is to do some fancy animation and toggle classes on elements, you're wasting space over the wire and cycles on the client's browser.
      singulars
    2. COI always pass in DOM elements to jQuery whenever I can. It bypasses having to use jQuery's Sizzle engine, which can be a huge performance crutch. Although Sizzle is smart enough to to bypass having to do a full parse of a selector string when it's a simple ID, there's no reason to initialize the engine at all when you're doing something this simple, and especially when it could be happening as rapidly as a user mousing over different elements. In fact, I would've liked to rewrite *all* of this code in plain vanilla JS but didn't want to deviate too much from the original question.
      singulars
    3. CONote that this method will gracefully degrade for older browsers, there just won't be any animations. If animations are *absolutely necessary*, you could always fall back to jQuery's animate function.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload