Chain dynamically created dropdowns with JQuery
I'm building some kind of indefinite filters for an app, and I'm havin this problem when I clone some selec开发者_开发问答ts.
The things is this selects are chained between them, trough the Chained Selects jQuery plugin.
The problem is that every time I clone the selects, the chaining stops working, and I've tryed everything, such as .live() to make it work, but it seems I'm out of luck :D
Here you have a sample of what I'm talking about, http://jsfiddle.net/7K2Eu/63/
At first, the selects chain normally, but when I clone the form, they stop working, except for the first row of selects.
Thank you!!
http://jsfiddle.net/FJFFJ/1/ i think this is what you search ;-)
I figured out that when you do the clone of the template you only clone the current existing template. thus if you made some choices and therefore the chaining reduced the set of selections you clone only that reduced set of selections.
I also figured out that cloning doesn't clone the chaining.
Also I changed your duplication support so that the chaining only is being applied to the new generated items.
Hmz... seems a bit overly complicated...
Here's another example
精彩评论