it is contained in a form and I really want to avoid submitting the form to add/remove elements.
Now this example is sorta what I need except I need a maximum number of elements to be added and I need them to be sequential I.e. You add 1 then you add 2, then you remove 2, then you remove 1 then when you add again, it adds 1 then 2 and so on. In the example (and all others similar) you add 1, then 2, then 3, you take 3 and 2 away then the next time you add it jumps to 4 then 5.
Thanks very much in advance!