Inserting new elements into sortables list

Inserting new elements into sortables list


Hi,
I'm trying to insert new items into a sortable list, but the new items
are not sortable so they mustn't be inheriting some property or
initialization routine is missed on them when they're added. My basic
code is this:
<ul id="items">
<li>one</li>
<li>two</li>
</ul>
<script>
// stripped down initialization
$('#items').$('#object-list').sortable ();
function add_item () {
// let's say we have item_html as an html response from the server
// that contains a new <li> and its contents
$('#items').append (item_html);
}
</script>
Let me know if there's something I can add to enable sorting for that
new element. Perhaps I have to insert it differently?
One other thing, I'm wondering if it's possible to designate a
specific area as the draggable area of the <li> (say I've styled it
into a rectangular block and I wanted to make the corner where you
grab to drag it and sort)?
Thanks in advance,
Lux