Is there a "clean" way to insert an element into a jQuery UI Selectable control?
Let's say I have the following choice:
<div id="selectable"> <div>Item 1</div> <div>Item 2</div> <div>Item 3</div> </div>
I could manually insert a line, for example:
$('<div>Item 4</div>').addClass('ui-selectee').appendTo($('#selectable'));
While it visually looks right, are there any events that I need to enable? Is this a clean way to insert an item, or is there a better way?
source share