是否有资源可以帮助将Prototype JavaScript转换为jQuery? [英] Is there a resource to help convert Prototype JavaScript to jQuery?

查看:65
本文介绍了是否有资源可以帮助将Prototype JavaScript转换为jQuery?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我以前广泛使用过Prototype,它帮助我们为我们的Web应用程序添加了相当多的交互性。但是我们正在考虑使用jQuery来标准化Visual Studio中更好的支持。

I have extensively used Prototype before and it helped us add considerable interactivity to our web applications. However we are looking at making the move to use jQuery in order to standardize on something better supported in Visual Studio.

我知道我们可以使用jQuery.noConflict来运行它与Prototype一起使用,但我们希望避免让用户下载这两个库来使用我们的网站。

I understand that we can use the jQuery.noConflict to run it alongside Prototype, but we would like to avoid having users need to download both libraries to use our website.

那么,是否有一个很好的资源可以帮助我们老去从Prototype到jQuery的脚本?

So, is there a good resource that can help us move old scripts from Prototype to jQuery?

推荐答案

除了说我之外,我对你的问题不能帮助你太多没有听说过任何这样的工具,如果真的存在,我会感到非常惊讶。

I can't really help you too much with your question, other than to say that I haven't heard of any such tool, and that I'd be really surprised if one actually existed.

虽然我认为jQuery是一个很棒的库,但你呢我只想要只使用一个库,只要记住你改变所有脚本的成本将是多少小时的工作。用户下载额外30kb脚本的成本大约为0.3秒。或许尝试慢慢逐步淘汰Prototype并仅在a)必须时重构现有页面,或b)如果你没有更好的事情要做。

While I think jQuery is a great library, and that you're right to be wanting to only use one library, just remember that the cost of you changing over all your scripts is going to be many many hours of work. The cost of your users downloading an extra 30kb of scripts is going to be roughly 0.3 seconds. Perhaps try to slowly phase out Prototype and only refactor your existing pages when a) you have to, or b) if you've got nothing better to do.

这篇关于是否有资源可以帮助将Prototype JavaScript转换为jQuery?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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