I have a text form field that I want to convert into a select element.
I want to preserve any and all "data" properties that I set on the
text field when I replace it with a select field without knowing in
advance what those property names are.
Here's a made up example to demonstrate. I want start with this:
<input type="text" name="number" value="one" data-a="alpha" data-
b="beta">
and end up with this
<select name="number" data-a="alpha" data-b="beta">
<option selected>one</option>
<option>two</option>
<option>three</option>
</select>
I can copy the form field name, and clone any events but without
knowing the property names, is there a way I can clone the properties?
--
To unsubscribe, reply using "remove me" as the subject.