为什么jquery ui对话框mangle我的jquery.tokeninput.js自动完成? [英] Why does jquery ui dialog mangle my jquery.tokeninput.js autocomplete?

查看:231
本文介绍了为什么jquery ui对话框mangle我的jquery.tokeninput.js自动完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用snazzy jquery tokeninput插件和jquery ui。当我显示一个带有令牌输入的表单时,不是正确显示令牌输入,它会丢失一些样式并分成两个输入框。我做了一个复制页(链接下面),它损坏它。

I am using the snazzy jquery tokeninput plugin and jquery ui. When I display a form with a token input in it, rather than displaying the token input correctly, it loses some styling and splits into two input boxes. I've made a repro page (linked below) which mangles it.

为什么要这样做,我该怎么办呢?

Why is it doing it, and what can i do to fix it?

示例repo html doc here : http://dl.dropbox.com/u/2808109/ jquery%20dialog%20tokeninput%20demo.htm

example repo html doc here: http://dl.dropbox.com/u/2808109/jquery%20dialog%20tokeninput%20demo.htm

编辑:找到了答案

推荐答案

看起来对话框重新运行代码块中的脚本标记,因此我的自动填充执行了两次。

It looks like dialog re-runs the script tags in the block of code so my autocomplete is executing twice.

删除我正在对话的代码中的脚本标记

my fix was to remove the script tags in the code I was dialoging

$("#popup script").remove();
$("#popup").dialog({ ... });

这篇关于为什么jquery ui对话框mangle我的jquery.tokeninput.js自动完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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