$(function() { var button = new Ox.Button({ value: "First", }).css({ position: "absolute", left: "16px", top: "16px" }).appendTo($("body")), menu = new Ox.Menu({ element: button, id: "select", items: [ { checked: true, group: "123", id: "first", title: "First" }, { checked: false, group: "123", id: "second", title: "Second" }, { checked: false, group: "123", id: "third", title: "Third" }, {}, { checked: false, group: "123", id: "fourth", title: "Fourth" }, { checked: false, group: "123", id: "fifth", title: "Fifth" }, { checked: false, group: "123", id: "sixth", title: "Sixth" } ] }); button .click(menu.toggleMenu) .bind("OxClickMenu", function(event, data) { console.log(data) button.options({ value: data.value }); }); $select = $("