AddChildAt() to add item at specific index position

I have a textBox and I am using it as a mail address input field where the user can type in several addresses, a bit same as in hotmail. Each address is rendered into a clickable button. Thus upon double-clicking on a specific address I want the item to be editable. After having edited the address when the user taps enter, the item is added to the list of mail adds.

I am adding it using the code below:

flowBox.addChildAt( myItem, myindex);

However addChildAt seems to add the item as the last item in the list. But I want it to add the item the position where it was originally. Say the item was at position 2 in the mail list, after editing adn tapping enter, it should add at position 2 itself and not at the end of the list.

Can you please tell me if there is any way for doing this?



Try to use addElementAt() instead. More details are here.

Need Your Help

Globals!ReportServerUrl Returning LocalHost Instead of Report Server URL

url reporting-services ssrs-2008 localhost globals

I am using a global variable in an SSRS but it is returning the wrong value.

Each function after load, or the other way around?

jquery load position each

I could just test this, but because internet speeds are so fast my images are loaded so quickly I am not sure that this works or not.