问题
I started from here jQuery clone chained selects
The answers by Paulj
Version 1: http://jsfiddle.net/m4JTQ/2/
Version 2 (this is a modified version getting rid of the i iterator: http://jsfiddle.net/Zf7xb/1/
It works perfectly. But now im looking for more dificult.
The new scenario is:
----Group1 : [+] [-]-------------------------------
----Subgroup : [+] [-] ------------
--Chile | Santiago | Chiñihue
--Argentina | San Juan | Rawson
--Argentina | San Juan | Rawson (cloned)
-----------------------------------
----------------------------------------------------
If i click at [+] on subgroup it will clone the last subgroup of this group.
If i click at [+] on group it will clone the last group with the last subgroup infos.
Ie:
----Group2 : [+] [-]-------------------------------
----Subgroup : [+] [-] ------------
--Argentina | San Juan | Rawson (cloned)
-----------------------------------
----------------------------------------------------
来源:https://stackoverflow.com/questions/12761534/jquery-advanced-clone