I need to transfer all data-attributes from option tags to to UI selectmenu items (li tags). How do this with API ?
<select class="select" id="" name="PROPERTY[126]">
<option value="315" data-filter="flat">Квартира</option>
<option value="316" data-show="standart" data-filter="room">Комната</option>
<option value="317" data-filter="house" data-hide="standart flat room uchastok" data-show="house zarub elite">Коттедж</option>
<option value="318" data-filter="uchastok" data-show="zarub uchastok elite" data-hide="standart flat room house">Участок</option>
<option value="319" data-filter="zarub" data-show="elite" data-hide="standart">Зарубежная недвижимость</option>
</select>
<script>$("select").selectmenu()</script>
Here is a solution:
And a working demo: http://jsfiddle.net/gds9xkkm/