클릭하면 버튼 바로 아래에 팝업 메뉴가 표시되는 일련의 버튼이 있습니다. 버튼의 위치를 뷰에 전달하고 싶습니다. 어떻게 할 수 있습니까?
ItemView = Backbone.View.extend({
tagName: 'li',
events: {
'click': 'showMenu'
},
initialize: function() {
_.bindAll(this, 'render');
},
render: function() {
return $(this.el).html(this.model.get('name'));
},
showMenu: function() {
var itemColl = new ItemColl();
new MenuView({collection: itemColl}); // how to pass the position of menu here?
}
});
this.options하지 않지만 원하는 경우 직접 수행 할 수 있습니다." .