Skip to content

Instantly share code, notes, and snippets.

@adamjohnson
Last active December 2, 2022 18:28
Show Gist options
  • Select an option

  • Save adamjohnson/afd8eab0e9bd83eb84ed051728d2180f to your computer and use it in GitHub Desktop.

Select an option

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 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


A well designed vanilla JS resource:

https://codetogo.io/

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


Accomplish common tasks with native JS:

https://htmldom.dev/

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


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 guys really broke it down well. Seems up to date too (~4 months ago last commit).


The ever classic:

http://youmightnotneedjquery.com/

and...

http://youmightnotneedjqueryplugins.com/


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, ala: https://github.com/nefe/You-Dont-Need-jQuery#5.0 ¯_(ツ)_/¯

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