0

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)
     -----------------------------------

----------------------------------------------------
Community
  • 1
  • 1
Tca
  • 43
  • 3
  • 1
    What have you tried so far? If nothing, please do some experimentation then I'll be happy to give you some suggestions or clone your jsfiddle and help you with the code. In your original example you were already fairly close to the answer. – Paul J Oct 08 '12 at 20:37
  • Hi Paul. Your answer left me almost there but i can not figure out how to clone subgroup in the other group. Here is my test http://jsfiddle.net/vcZeu/11 . I know the code is a bit messy but it is for test purpose. – Tca Oct 09 '12 at 19:49

0 Answers0