How can I use FancyUpload (with mootools) side by side with prototype.js?

蓝咒 提交于 2019-12-11 05:54:16

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/2180995/how-can-i-use-fancyupload-with-mootools-side-by-side-with-prototype-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!