3 ms·
What do you mean by jQuery syntax? jQuery has a lot of features. If you mean the query selector you can do let $ = document.querySelectorAll; If you mean
by driverdan 8y ago
What do you mean by jQuery syntax? jQuery has a lot of features. If you mean the query selector you can do
let $ = document.querySelectorAll;
If you mean chaining commands you can use the latest version of jQuery. It uses querySelectorAll under the hood.
- mattlondon 8y agoFYI I believe it is generally considered better to prefer const over let if the value is never going to change. Prevents accidentally reassigning $ here.
- driverdan 8y agoTrue. I quickly threw that out as an example.
- TamDenholm 8y agoYes i mean exactly that, but implementing as much of the jQuery library as possible, or certainly the most used parts. Was just a thought excercise.
- jrochkind1 8y agoI think maybe that _is_ JQuery.