I have a sorted list of items that returns results based on what the user enters in the search box. The results are always crowded, and here I use the following css for this:
#list { overflow-x: visible; overflow-y: hidden; }
This allows me to have only a vertical scrollbar. Then I drag and drop individual sheets that are in the list into the area with the option to delete. Grouped functionality is added to the list using jQuery below:
$("#list").sortable({
connectWith: ".connectedSortable",
helper: 'clone',
appendTo: 'body',
zIndex: 999
});
I use appendTo: 'body' to ensure that the element that is being dragged is on top of everything and will not be below the list of other elements when dragging. However, whenever I drag any item from the list, the DIVs that are in the item will have CSS styles.
I understand that this is due to the fact that when an element is dragged, it is added to the 'body' and, therefore, does not have a parent element to inherit the original CSS styles.
My question is, how can I drag an item back to its original style to make sure that it stays the same even if I drag / not drag it? through events?
EDIT:
css. br, div, -, .