如何转换的JavaScript函数将jQuery [英] How To Convert Javascript Functions to JQuery

查看:117
本文介绍了如何转换的JavaScript函数将jQuery的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不熟悉并且使用Javascript,我有一个项目的JavaScript codeS转换为jQuery的脚本。

I'm not familier with Javascript, and I have to convert a Project's Javascript codes to Jquery scripts.

ofcourse我不是项目负责人或类似的东西,我只是阐述,此过程可能已什么样的问题,可以用什么样的needness的脸?

ofcourse 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 ?

所以,如果你知道任何解决JavaScript函数转换为jQuery的那些请帮我知道什么应该被考虑。

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

推荐答案

这是它添加了jQuery现有项目与JavaScript不应该打破现有的JavaScript,除非您使用的是冲突的框架,比如原型,在这种情况下,你往往能逃脱均为present简单的jQuery设置为noConflict模式。

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.

有肯定不需要重写工作的JavaScript函数到jQuery的,如果他们,因为他们是除非你的主要目标是提高效率/写短code或者即使它只是因为JavaScript的已变得过于繁琐工作正常维护。

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.

在,如果你只是想一些新的jQuery功能添加到网站总结;为什么不添加它,离开现有的JavaScript作为是什么?

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?

这篇关于如何转换的JavaScript函数将jQuery的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆