Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others


0 votes
in Technique[技术] by (71.8m points)

jquery cloning a block of element. select element acting weired

Here is the recreation of my problem http://jsfiddle.net/WsFyV/7/ Select any option from the first one. and then click on add. The select element is cloned but with the value selected in the first one, My main problem is you cant select any other option in the new select element. Am I doing something wrong?

I got the fix.


did the trick. http://jsfiddle.net/broncha/WsFyV/34/ theres the fix on select element onchange event :) thanks guys

See Question&Answers more detail:os

Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

We've got exactly same problem here but just using $.uniform.update("selector") or $('selector').uniform() didn't worked for us on cloned elements.

What we've done to get it work was to replace the closest .selector by the select itself and then unforming it again:

// clonedObject is a jQuery object containing our cloned select

Hope this will save someone else a little time

Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share