我希望修复一些动态形式的错误
我在这里全力以赴地使用小提琴,以便您获得(大部分)图片:
http://jsfiddle .net/ch29z/11/
当您单击第一行中的 + 时,它会克隆 + 使其处于突出显示状态,因此副本为绿色。
如果将第一行设置为例如。 agent = excel,当它克隆时,第一个下拉列表将设置回标签,但第二个和第三个仍保留为“=”和“excel”
如果添加第二行,但然后删除第一行,然后添加另一行,项目之间的间距与您第一次添加行时不同(IMO,一旦您完成此操作,间距实际上会更好,这显然是一个 CSS 问题,但我就是无法让它正确放置。)
此外,当您选择变体,然后不好,然后返回变体,文本框被复制,现在有 2 个,如果重复该过程,则会添加另一个文本框。
不知道为什么会发生这种情况,因为所有其他动态生成的文本框的代码都是相同的。
非常感谢有关这些错误的任何帮助,另外几双眼睛确实有帮助。
问候,
马丁
I've went all out on the Fiddle here so that you get (most of) the picture:
When you click + in the first row, it clones the + in its highlighted state, so the copy is green.
If you set the first row to eg. agent = excel, when it clones, the first dropdown is set back to tags, but the 2nd and 3rd remain as "=" and "excel"
If you add a 2nd row, but then delete the first row, then add another row, the spacing between the items differs from when you're first adding the rows (IMO the spacing is actually better once you've done that, it's a CSS issue obviously but I just can't get it to sit right.)
Also, when you select variant, then bad, then go back to variant, the text box is duplicated so that there are now 2, if you repeat the process ANOTHER text box is added.
Not sure why this is happening as the code is the same for all other dynamically generated textboxes.
Any help regarding these bugs is greatly appreciated, another few pairs of eyes really do help.
Regards,
Martin
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
该空间似乎来自您在选择上设置的边距:
对于
div.autocomplete
,您应该在 DOM 中准备好它并使用style="display:none"
code>,就像使用select
一样。但如果你想像你一样注入它,你需要检查它是否不存在。The space seems to come from the margin you set on your select:
For the
div.autocomplete
you should have it ready in the DOM and play with astyle="display:none"
, like you do with theselect
. But if you like to inject it like you do, you need to check if it does not exist already.似乎成功了。感谢您的帮助。
Seemed to do the trick. Thanks for your help.