最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

java - How To Convert Javascript Functions to JQuery - Stack Overflow

programmeradmin0浏览0评论

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 ?

So if you know any solution to convert Javascript Functions to Jquery ones please help me know what should be considered .

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 ?

So if you know any solution to convert Javascript Functions to Jquery ones please help me know what should be considered .

Share Improve this question edited Sep 29, 2019 at 8:34 Brian Tompsett - 汤莱恩 5,89372 gold badges61 silver badges133 bronze badges asked Feb 21, 2010 at 11:46 Nasser HadjlooNasser Hadjloo 12.6k15 gold badges71 silver badges102 bronze badges 2
  • 1 Why there's a need of conversion...? – kennytm Commented Feb 21, 2010 at 11:49
  • i think you just need to make ur own js framework to be reusable dont need to make it a jquery funcs basicly cause jquery is from javascript so where is the conversion – Marwan Commented Oct 9, 2011 at 13:52
Add a ment  | 

3 Answers 3

Reset to default 6

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 bee 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.

No, I am afraid there is no such converter, and even if there was you would still have to do some changes yourself. I would suggest going through the jQuery docs to know the differences and implement right away.

发布评论

评论列表(0)

  1. 暂无评论