how to add an element always as last element using jquery?

Get the parent of the list and add the new item to that parent as the last child.

Using plain javascript:

parent.appendChild(newElement);

Mozilla documentation: https://developer.mozilla.org/En/DOM/Node.appendChild

If you want to add other items and still have this item be the last item, then you will have to add the new items before this last item or remove this item, append your new item, then append this one back again at the end.

Once you already have the last element in the list, if you then want to add a new element right before that last element, you can do it like this:

parent.insertBefore(newElement, parent.lastChild);

$('#list').append('<div></div>') will append it to the very end of the #list

If you want to append it to the very last div, just in-case there are other elements after that, then you can use $('#list div:last').after('<div></div>')