Why does jquery ui dialog mangle my jquery.tokenin

2019-06-10 07:29发布

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?

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

edit: have found the answer

1条回答
戒情不戒烟
2楼-- · 2019-06-10 08:02

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({ ... });
查看更多
登录 后发表回答