Skip to content

Instantly share code, notes, and snippets.

View ibadin's full-sized avatar
💻
write code that is easy to delete

ibadin

💻
write code that is easy to delete
View GitHub Profile
@tai2
tai2 / jquery-selectmenu.js
Last active September 11, 2021 11:30
jquery ui select menu vue component
Vue.component('jquery-selectmenu', {
props: ['value'],
template: `<select><slot /></select>`,
mounted: function() {
const emit = value => this.$emit('input', value);
$(this.$el).selectmenu({
change: function(event, data) {
emit(data.item.value);
}
});