且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

添加/删除div块jQuery

更新时间:2023-12-05 22:02:34

你需要附加到父div,添加一个额外的div

you need to append to a parent div, add an additional div

就像房间类型
之上的容器一样,并将你的克隆附加到它上面

like "container" on top of your "room-type" and append your clone to it

room.clone().appendTo("#container");

在删除房间类型课程的长度之前

also before removing check the length of your "room-type" class

这里有一个适合你的小提琴

here is a working fiddle for you

https://jsfiddle.net/fxabnk4o/12/