If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Up yes, down no ...

Hello, I have a problem with my code - I made a function to manage "divs" - moving them up, down or remove them (these divs are in one "container div" and I am using jQuery .each function to rebuild them to an array).... its working really nice, but .... I can move these boxes only up when I click on down arrow, it does nothing... but the script is working well, I tried it by alert and many times checked the code - I am lost ... here is the script:

make_array() will make an array , refresh_controls just update up, down arrows(delete up for first element and so)....I will be glad for every help .... thank you. If you need more code or so, just ask.

... why ? jQuery is more easy and it works same ... I do with jQuery just retriving html
$("#form_inputs_add .element").each(function(){
bla bla bla ....
});
and then saving it back(edited):
$("#form_inputs_add").html(elements);
.... why to dont use it ? this is simpleir - I think problem isnt here ... For "up" arrow it works well and fast - down arrows work, but it DONT change the positions - but the "algorithm" looks well :/ try to look at it too - maybe I just missed a little problem ... I really dont see anything wrong :/