0

working on project where 100`s line of code on jQuery, I know how to use jQuery that's not the issue, but when you rewriting whole project from php to node.. it's just don't look nice)

So my question is, is it any online convertor that can convert JQ to readable JS? I didn't found anything, but would be great if somebody know some.

Sarkis Arutiunian
  • 1,281
  • 3
  • 17
  • 34
  • 1
    I don't know that I would trust any script/build that attempts to convert production jQuery to production vanilla Javascript. Transpilation is one thing, but automated conversion to production code sounds sketchy, imo. What is it that "doesn't look nice"? If the issue is simply the `$` alias, you can opt to instead find==>replace to just use `jQuery` instead... – Alexander Nied Feb 21 '17 at 22:42
  • issue is unneeded dependence, and not matching to style-guide code – Sarkis Arutiunian Feb 21 '17 at 22:44
  • It makes me curious about the style-guide code. – TGrif Feb 22 '17 at 18:00
  • https://github.com/airbnb/javascript – Sarkis Arutiunian Feb 22 '17 at 18:20

1 Answers1

1

Unfortunately, the magic tool you seek to convert jQuery to plain Javascript does not exist. You will have to learn the equivalent Javascript methods and do the conversion yourself. In addition, you would need to recreate some of the things that jQuery takes care of for you such as browser support.

Here is a similar question that covers some of these points.

Is there an easy way to convert jquery code to javascript?

Community
  • 1
  • 1
thaliaarchi
  • 152
  • 2
  • 8