克隆一个包含"customized"元素的divjQueryUI datePicker [英] Clone a div that contains "customized" jQueryUI datePicker

查看:87
本文介绍了克隆一个包含"customized"元素的divjQueryUI datePicker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的div包含3个字段

I have a div that contains 3 fields

您可以在此处看到图像
http://imgur.com/A3tbd.jpg

You can see the image here
http://imgur.com/A3tbd.jpg

我正在使用此插件克隆此div
http://sroucheray.org/blog/demos/jquery-dynamic-form/

I'm cloning this div with this plugin
http://sroucheray.org/blog/demos/jquery-dynamic-form/

我的问题是:

  • 它不能正确克隆datePicker.
  • 我正在使用验证表单插件,但我想这个插件没有准备好验证克隆的元素

在执行此序列操作时,是否应该使用任何简单的代码,其他插件或某些功能?

Is there any easy code, other plugin or some functions I should use for doing this sequence?

  • 验证用户已填写实际div的3个字段
  • 如果是,请克隆div并创建一组新的3个字段.另外,正确克隆datePicker
  • 如果用户单击删除按钮,则删除最后一个div(最后3个字段)
  • 提交表单后,正确张贴所有字段

谢谢

推荐答案

我遇到了一个类似日期选择器并克隆它的问题.我的解决方案是在克隆元素之前删除日期选择器.然后,在克隆元素之后,在克隆上初始化日期选择器.

I ran in to a problem just like that with the date picker and cloning it. My solution was to remove the date picker prior to the cloning the elements. Then after cloning the elements, initialize the datepicker on the clone.

这篇关于克隆一个包含"customized"元素的divjQueryUI datePicker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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