2

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.

$.uniform.update("select");

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

Broncha
  • 3,794
  • 1
  • 24
  • 34

2 Answers2

2

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
clonedObject.closest('.selector').replaceWith(clonedObject);
clonedObject.uniform();

Hope this will save someone else a little time

malko
  • 2,292
  • 18
  • 26
1

The problem is uniform. It's unable to handle the cloning, and among other things creates duplicate ids, which is why the original select always gets focus when you select something in the clone.

kojiro
  • 74,557
  • 19
  • 143
  • 201