Selectable, add html

Selectable, add html

  1. <script> $(function() { $( "#selectable" ).selectable({ stop: function() { var result = $( "#select-result" ).empty(); $( ".ui-selected", this ).each(function() { var index = $( "#selectable li" ).index( this ); result.append( " #" + ( index + 1 ) ); }); } }); }); function getSelect() { window.opener.document.getElementById('txtUrl').value = ''; window.close(); } </script>
Hi, how can I get a list of selected items and pass to the function getSelect that will provide html code for the parent window with items which I selected