Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WordPress without jQuery - Is this possible?

Relatively new to WordPress development. I am creating a new custom theme from scratch and would really like to just write vanilla javaScript without slowing things down with all the bloat of jQuery. I was thinking I could just simply dequeue jQuery.

Would this break anything behind the scenes for WordPress to function or is there no dependency?

like image 795
ezeikel Avatar asked Oct 31 '22 14:10

ezeikel


1 Answers

jQuery is unlikely to slow you down as it's simply a bunch of optimized DOM selectors/DOM methods/utility functions.

You should be able to proceed with Vanilla JS unless any plugin or library you are using depend on it.

like image 78
Boyang Avatar answered Nov 09 '22 22:11

Boyang