How To Convert Javascript Functions to JQuery
I'm not familiar with Javascript, and I have to convert a Project's Javascript codes to Jquery scripts.
Of course I'm not project leader or something like it, I'm just elaborating that this process may has what kind of issues and may face with what kind of needness ?
开发者_Go百科So if you know any solution to convert Javascript Functions to Jquery ones please help me know what should be considered .
Adding jQuery to an existing project with JavaScript on it shouldn't break any existing JavaScript unless you're using a conflicting framework such as prototype, in which case you can often get away with both being present simply by setting jQuery to noConflict mode.
There's certainly no need to rewrite working JavaScript functions into jQuery if they're working fine as they are unless your primary goal is to improve efficiency / write shorter code or even if it's simply because the JavaScript has become too cumbersome to maintain.
In summary if you just want to add some new jQuery functionality to a website; why not just add it and leave the existing JavaScript as is?
JQuery is essentially a set of JavaScript functions that make some JavaScript tasks easier.
If you have an existing JavaScript project it will work without any conversion, but you might decide that certain sections will be shorter and more maintainable if you take advantage of certain JQuery functions.
I don't know of any conversion utilities that will do this for you, but the nice thing is that you can decide which bits you want to convert. You can make this decision based on time available and know that your project will work regardless of how much jQuery you decide to use.
Nope, I am afraid there is no such converter, even if there was you would still have to do some changes yourself. I would suggest you to go through Jquery docs to know the differences and implement right away. Thanks
精彩评论