不兼容的Mootools脚本 [英] Incomatible Mootools scripts

查看:114
本文介绍了不兼容的Mootools脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我想做的是拥有一个 lightbox 和一个

Well, what i want to do is having a lightbox and a sliding top panel. Both use mootools and both seem to use different versions.

尽管注释掉其中之一是不可行的,尽管它们是实际的mootools库.

It does not work if comment out one of these although they are booth the actual mootools library.

<!a possible js config. either these two are commentented out, or the mootols.svn.js
<!-- libraries/frameworks for milkbox-->
<!--script type="text/javascript" src="js/mootools-1.2.3-core-yc.js"></script>
<script type="text/javascript" src="js/mootools-1.2.3.1-more.js"></script-->
<!-- mootools for the sliding top panel. should work also with the one imported above, so i was going to deactivate the one below-->
<script type="text/javascript" src="js/mootools.svn.js"></script> 
<script type="text/javascript" src="js/milkbox.js"></script>
<script type="text/javascript" src="js/panel.js"></script>

因此,无论我将其中哪一个(* -1.2.3-core-yc和-more.js或mootools.js)注释掉,总是其中一项功能不起作用.

So no matter wich one (*-1.2.3-core-yc and -more.js or mootools.js) i comment out, always one of the features doesnt work.

尽管实际上都是可行的,因为两者都是mootools.有人对此有解决方案吗? (我听说过名称空间"一词,大致了解它的含义,但我不知道如何使用它)

While it actually should be possible as both are mootools. Does someone have a solution for this? (i have heard about the term namespace and know roughly what it means, but i dont know how to use it)

非常感谢

本尼

推荐答案

对于进行原型制作的框架(例如mootools或prototype),不能使用命名空间来产生很大的效果.

You cannot use namespacing to great effect with frameworks that do prototyping (such as mootools or prototype).

在您的情况下,我可以假定滑动顶部面板是mootools 1.11插件(您的链接无效),灯箱是1.2.3 ...

In your case, I can assume the sliding top panel is a mootools 1.11 plugin (your link does not work), the lightbox is 1.2.3...

有一个抽象层将mootools 1.11兼容性引入到1.2中-请检查 http://www.siafoo .net/article/62 ,在mootools邮件列表中也有几篇相关文章( http://groups.google.com/group/mootools-users?pli=1 )

There is an abstraction layer that brings mootools 1.11 compatibility into 1.2 - check http://www.siafoo.net/article/62, there are also several posts on this on the mootools mailing list (http://groups.google.com/group/mootools-users?pli=1)

这里的目标应该是-摆脱mootools 1.11,放入兼容性代码,然后尝试使面板正常工作(可能需要在这里和那里进行一些细微的更改,但这并不是一件大事).不久前,我面临着同样的困境,最终从零开始编写了一个用于1.2.3的滑入式面板.

Your objective here should be - get rid of mootools 1.11, put the compatibility code in and try to get the panel to work (there may need to be some slight changes here and there but it's not that big a task). A while back I faced the same dilemma and ended up writing a slide-in panel for 1.2.3 from scratch.

此外,请考虑 http://web-kreation.com/demos中的WebKreations幻灯片. /login_form_mootools_1.2/-也许您可以使用它作为替代.

Also, consider the WebKreations slide in http://web-kreation.com/demos/login_form_mootools_1.2/ - perhaps you can use that as your alternative.

祝你好运:)

这篇关于不兼容的Mootools脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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