如何将 FancyUpload(与 mootools)与prototype.js 并排使用?
我有一个正在使用原型和 scriptaculous 的网站。在我的网站的一页中,我想使用 Digitarald 的 FancyUploader(我还没有找到任何其他东西如此优雅,并提供多个文件选择)。是否可以在同一页面上使用两者?如果是这样,我该怎么做?
I have a site that I am using prototype and scriptaculous on. One one page of my site, I would like to use Digitarald's FancyUploader (I have not found anything else that is as elegant, and offers multiple file selection). Is it possible to use the two on the same page? If so, how would I do it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无法使用原型运行Mootools脚本。
虽然 Mootools 提供了美元安全模式,但该模式仅提供与提供
$()
函数的框架的兼容性。Mootools 和 prototype 不兼容的原因是它们都用自己的方法扩展了原生 JavaScript 原生。不幸的是,没有办法覆盖这种行为。
SWFUpload 是一种替代解决方案,几乎与所有 JavaScript 框架兼容。它在功能上几乎等同于 FancyUpload。您可能想将其视为替代解决方案。如果没有,您必须在 Mootools 和 prototype 之间做出选择。
There is no way to run a Mootools script with prototype.
While Mootools provide a dollar-safe mode, that mode only provided compatibility with frameworks that provides a
$()
function.The reason why Mootools and prototype are incompatible is that they both extend native JavaScript natives with their own methods. Unfortunately, there is no way of overriding this behavior.
SWFUpload is an alternative solution which is compatible with pretty much all JavaScript frameworks. It is pretty much functionally equivalent to FancyUpload. You might want to consider it as an alternative solution. If not, you'll have to make a choice between Mootools and prototype.