I know all internal jQuery functions are written in JavaScript, so it should technically be possible to just evaluate jQuery to JavaScript.
I have a snippet of JavaScript that uses jQuery that I need to use in an environment where jQuery isn't available. I know I could translate it by hand, but it is quite a lot of code. Is there a tool out that that does this?
Just to make it clear: with a lot of effort I could probably get jQuery in the environment but I would like to have a solution that is a bit more resource friendly. If there is no tool like this I'll just try to translate the code by hand, I was just wondering whether there was such a tool.
I know all internal jQuery functions are written in JavaScript, so it should technically be possible to just evaluate jQuery to JavaScript.
I have a snippet of JavaScript that uses jQuery that I need to use in an environment where jQuery isn't available. I know I could translate it by hand, but it is quite a lot of code. Is there a tool out that that does this?
Just to make it clear: with a lot of effort I could probably get jQuery in the environment but I would like to have a solution that is a bit more resource friendly. If there is no tool like this I'll just try to translate the code by hand, I was just wondering whether there was such a tool.
Share Improve this question edited Jan 25, 2012 at 22:37 Tim van Dalen asked Jan 25, 2012 at 22:08 Tim van DalenTim van Dalen 1,4713 gold badges22 silver badges41 bronze badges 8 | Show 3 more comments1 Answer
Reset to default 16Google's Closure Compiler's advanced optimization compresses your code to only include parts that are necessary, so the parts of jQuery that aren't used are stripped away.
getElementsByClassName()
, but every browser jQuery runs on supports$(".classname")
. – Tomalak Commented Jan 25, 2012 at 22:38