-1

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?

Colin Brock
  • 20,857
  • 9
  • 45
  • 61

2 Answers2

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.

Community
  • 1
  • 1
Candide
  • 29,406
  • 6
  • 51
  • 57
0

Here's an old-school approach (JS): http://www.nuff-respec.com/external/javascriptgui.html

PHearst
  • 731
  • 6
  • 29