I'm writing some jQuery to modify options in a form. I noticed that when I use .append() for multiple elements at once it will work like this:
$("#item").append("<option>Item 1</option><option>Item 2</option><option>Item3</option>");
But if I try to clean it up so it's not such a long unreadable line like this:
$("#item").append("<option>Item 1</option>
<option>Item 2</option>
<option>Item3</option>");
It won't work? Why? And is there any workaround for this?