如何使用mootools创建浮动div?

发布于 2024-10-03 05:39:47 字数 169 浏览 0 评论 0原文

我正在使用一个应用程序(IIPImage),它使用使用 mootools api 创建的脚本来显示高分辨率图像。我想在此页面中插入一个浮动窗口。最初我想使用jquery,但是我发现jquery不能与这个库共存,所以我需要使用mootools来创建这个浮动div。我怎样才能做到这一点?有人可以帮助我吗?

谢谢

I'm using an application (IIPImage) which display an High Resolution Image using a script created with mootools api. I want to insert a floating window in this page. Initially I think to use jquery, BUT I discover that jquery can't coexist with this library, so I need to use mootools to create this floating div. How I can do this? Someone can help me please?

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光匆匆的小流年 2024-10-10 05:39:47

mootools 和 jquery 可以很好地共存,只要进行一些工作 - jquery 有一个 .noConflict() 模式,并且 mootools 不会接管 $ (自 1.2.2 起)如果它已经被定义并且将恢复使用 document.id 代替。然而,IIPImage 似乎是为 1.2.0 编写的,它既旧又有问题,并且不关心覆盖 $ - 将 mootools 升级到 1.2.5 并在脚本中用 document.id( 替换 $( 的提及或添加一个闭包就像 (function($) { ...来自缩放器的代码 ... })(document.id);

您可能需要找到任何全局变量引用并更改它们是从 var foo =window.foo = 声明的,但总而言之,

对于其他解决方案来说,这不应该是一场戏剧,你可以弄清楚 。这里 http://davidwalsh.name/persistent-header-opacity

这是一小段代码启用位置:修复不支持它的浏览器(我认为8之前的IE)

玩得开心。

mootools and jquery can co-exist just fine, given some work - jquery has a .noConflict() mode and mootools won't take over $ (since 1.2.2) if it has already been defined and will revert to using document.id instead. however, IIPImage seems to have been written for 1.2.0 which is old and buggy and does not care about overwriting $ - upgrade mootools to 1.2.5 and replace mentions of $( with document.id( in the script or add a closure instead like (function($) { ... code from the zoomer ... })(document.id);

you may need to find any global vars refrences and change them as declared from var foo = to window.foo = but all in all, it should not really be a drama.

as for the other solution, you can figure it out here http://davidwalsh.name/persistent-header-opacity

this is a small bit of code that enables position: fixed for browsers that don't support it (IE before 8 i think)

have fun.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文