Pasta: 5c3c3c652d38ceda84938718d9e1691d5cb24698 (2014-08-10)

Język: JavaScript
Adres: p43.pl/p,5c3c3c652d38ceda84938718d9e1691d5cb24698
Ilość linii: 21
Rozmiar: 0.83 kB
Wyświetleń: 456
Ostatnio użyto: 2017-09-13 16:02:50
// Rather than directly using a slector, you can use the selectmenucreate event // $(document).on( "selectmenucreate", 'select[multiple]', function( event, ui ) $('select[multiple]').each(function() { var $this = $(this); // Hack for bsmSelect and later versions of jQuery $.browser = {msie: false}; $this.selectmenu( "destroy" ).bsmSelect({ listType: 'ul' }); $this.siblings('.bsmSelect').selectmenu(); var list = $this.siblings('.bsmList').listview({inset : true}); $this.change(function () { list.find('li span').each(function() { var $this = $(this); $('<a></a>').text($this.text()).prependTo($this.parent()); $this.remove(); }); list.find('li a~a').attr('data-icon', 'delete'); list.listview('refresh'); }); });