Skip to content
This repository has been archived by the owner on May 16, 2021. It is now read-only.

Cloned elements don't update or restore #340

Open
edirpedro opened this issue Jun 11, 2013 · 4 comments
Open

Cloned elements don't update or restore #340

edirpedro opened this issue Jun 11, 2013 · 4 comments

Comments

@edirpedro
Copy link

When you clone a set of form elements to duplicate, it's not possible to restore or update these elements and even you can't try to rebuild calling uniform() for these elements because they still have the HTML pieces on it.

I think that update() and restore() needs to work with elements not uniformed too, at least restore().

@caseynix
Copy link

+1 on this. Even with using prop to update the id's of cloned elements, the original selector still keeps focus.

@caseynix
Copy link

Run $.uniform.restore('select'); before the clone or elements are appended. Then after the elements are cloned/appened, reapply uniform: $('select').uniform();

That cleared it up in my build. Hopefully that helps.

Working fiddle: http://jsfiddle.net/aykRa/

@Relequestual
Copy link

Workaround confirmed. Thanks =]

@shehi
Copy link
Member

shehi commented Aug 26, 2016

Updated fiddle for the workaround: http://jsfiddle.net/Shehi/2m0Lza8L/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants