Lets say I have a form field. Also I can dynamically add more fields, can I swap them by clicking on a link or button (up and down) using JS or jQuery?
Asked
Active
Viewed 1,560 times
-1
-
`Up or down`? Care to elaborate? Show markup? Code? http://jsfiddle.net? Question? Something? – Darin Dimitrov Jul 10 '12 at 21:46
-
Well, I dont even now how to start, never did that, only have dynamic form – dojo Jul 10 '12 at 21:48
-
I hope you realize that *dynamic form* means like *nothing* without context/code/jsfiddle. – Darin Dimitrov Jul 10 '12 at 21:50
-
@setup a fiddle / show some code, be more specific. – Roko C. Buljan Jul 10 '12 at 21:50
2 Answers
2
The following functions that can help in adding elements: .append() to add after an element, .prepend() to add before an element.
For swapping elements there's already a post here.
0
Here's an old-school approach (JS): http://www.nuff-respec.com/external/javascriptgui.html

PHearst
- 751
- 6
- 29