Does anyone know of an automated tool that will convert a lot of jQuery code to native javascript?

I think the bulky jQuery library is really slowing down my site but manually converting all my code seems very daunting.

Ideally there would be something that was so flawless I could continue coding with jQuery and it would deploy my code as native JS. Hey, a girl can dream, right?

Recommended Answers

Hi Dani,

I don't know how effective or accurate it is:

https://the-code-monkey.github.io/JQuery2JS/

Regards,
Bill

Jump to Post

All 4 Replies

Hi Bill,

I can’t get that site to load for me at all from my mobile phone. It’s just a blank page. I’ll give it a shot from my laptop in a little bit, when I get back to my desk.

Hi Dani,

Why do you suspect that jQuery is slowing your site down?

Have you ran any tests on the site to backup what you are thinking?

The JQuery library itself isnt that big but depends on how you have written your Javascript.

Why do you suspect that jQuery is slowing your site down?

Because tools such as Google PageSpeed Insights alert me that the bottleneck to my page speed is my .js file which runs all of my jQuery stuff.

Have you ran any tests on the site to backup what you are thinking?

Yes, by using web-based tools such as GTmetrix, Chrome Lighthouse, etc.

The JQuery library itself isnt that big but depends on how you have written your Javascript.

Unfortunately we can't use jQuery Lite because we need the AJAX functionality. I know that jQuery-based selectors are more costly than native javascript selectors. Additionally, by its very nature, jQuery is essentially native javascript under the hood, so simply by virtue of being a client-based wrapper, it is going to add a layer of overhead. I also heard that jQuery's each fn, in particular, is significantly slower than the native JS equivalent.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.