jquery 工具 & $.maskedinput 冲突

发布于 2024-10-10 22:07:52 字数 564 浏览 0 评论 0原文

我需要一些帮助来解决一个奇怪的问题。

我正在使用 jQueryTools,对此我非常满意,但我认为 maskedinput 插件的 $.mask() 方法与 jQueryTools 的 .mask() 属性冲突。当我同时使用它们时,控制台显示“对象没有诸如 load() 之类的方法”。如果我从文档中删除 masket input js,则覆盖一切正常。

$.maskedInputs

$("#Phone1, #Phone2, #Gsm").mask("(999) 999 9999");

jQueryTools .mas()

var dialogsOverlay = $(".dialogs").overlay({
    mask: {
        color: '#fff',
        loadSpeed: 200,
        opacity: 0.8
    },
    closeOnClick: false,
    close: ".closeDialog"
});

你有类似的经验吗?

谢谢

I need some help about a wierd problem.

I'm using jQueryTools and i'm very hapy with that but i think maskedinput plug in's $.mask() method conficts with jQueryTools's .mask() property. When I used both of them together console says "object doesnt have a method such as load()". If ı remove the masket input js from document everything is ok with overlays.

$.maskedInputs

$("#Phone1, #Phone2, #Gsm").mask("(999) 999 9999");

jQueryTools .mas()

var dialogsOverlay = $(".dialogs").overlay({
    mask: {
        color: '#fff',
        loadSpeed: 200,
        opacity: 0.8
    },
    closeOnClick: false,
    close: ".closeDialog"
});

Do you have any exprience somethink like that?

Thanks

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

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

发布评论

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

评论(1

红ご颜醉 2024-10-17 22:07:52

只需将 maskedinput 中的 mask 函数重命名为其他名称即可。我将其重命名为 maskMyI。您基本上只需在 maskedinput 中查找并替换为您的新名称即可。然后在调用页面上的函数时使用新名称。

$("#Phone1, #Phone2, #Gsm").mask("(999) 999 9999");

变成了

$("#Phone1, #Phone2, #Gsm").maskMyI("(999) 999 9999");

就我而言 。使用您自己的函数名称。

Just rename the mask function in maskedinput to something else. I renamed it to maskMyI. You can basically just do a find and replace in maskedinput with your new name. Then use the new name when calling the function on your page.

$("#Phone1, #Phone2, #Gsm").mask("(999) 999 9999");

becomes

$("#Phone1, #Phone2, #Gsm").maskMyI("(999) 999 9999");

in my case. Use your own function name.

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