Skip to content

Instantly share code, notes, and snippets.

@adamjohnson
Last active December 2, 2022 18:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adamjohnson/afd8eab0e9bd83eb84ed051728d2180f to your computer and use it in GitHub Desktop.
Save adamjohnson/afd8eab0e9bd83eb84ed051728d2180f to your computer and use it in GitHub Desktop.
A list of "You might not need jQuery" / helpful native API's & methods.

A well designed vanilla JS resource:

https://codetogo.io/

☝️ Can search via method name or the task you want to accomplish.


A great list of commonly used native JS methods and API's:

https://vanillajstoolkit.com/reference/

☝️ Stuff like DOM Injection, DOM Traversal, JSON, AJAX, and array API's


Accomplish common tasks with native JS:

https://htmldom.dev/

☝️ DOM manipulation, handling events, organized by task instead of API


Some fancy JS snippets for very specific tasks

https://www.30secondsofcode.org/js/p/1/


A great list / 1:1 breakdown of jQuery Methods and what their modern API's look like:

https://github.com/nefe/You-Dont-Need-jQuery

These folks really broke it down well. Seems up to date too.


The ever classic:

youmightnotneedjquery.com (Github)

and...

youmightnotneedjqueryplugins.com (Github)


In blog format by Tobias Ahlin:

https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/


Vanilla JS Doc Ready function:

IE9+ (most simple) https://stackoverflow.com/a/31171096/908059

☝️ Browser support: https://caniuse.com/#feat=domcontentloaded

NOTE: Some people want to if/else if DOMContentLoaded has already been completed. ¯_(ツ)_/¯

OR (mini function): https://stackoverflow.com/a/30757781/908059

OR IE6+ (full fleged function): https://github.com/jfriend00/docReady

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment