AppendTo, does it change the DOM?
- by JD
Hi,
I have two list boxes and some JQuery function that does the following:
$(document).ready(function () {
//If you want to move selected item from fromListBox to toListBox
$("#AddButton").click(function () {
$("#fromListBox option:selected").appendTo("#toListBox");
});
});
I have a button that when clicked moves items from one list to another. This works, however when I do "View Page Source" in chrome, the list contains the original list and not the newly added items.
I expected appendTo to change the DOM but clearly this is not what is happening. Why is this?
JD