Search code examples
javascriptjquerycode-conversion

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


Is there an easy way to convert jQuery code to regular javascript? I guess without having to access or understand the jQuery source code.


Solution

  • The easiest way is to just learn how to do DOM traversing and manipulation with the plain DOM api (you would probably call this: normal JavaScript).

    This can however be a pain for some things. (which is why libraries were invented in the first place).

    Googling for "javascript DOM traversing/manipulation" should present you with plenty of helpful (and some less helpful) resources.

    The articles on this website are pretty good: http://www.htmlgoodies.com/primers/jsp/

    And as Nosredna points out in the comments: be sure to test in all browsers, because now jQuery won't be handling the inconsistencies for you.