uCotextMeu是用在Web应用上,对字体有完美支持的内容菜单。它只有2.2KB大小,它将菜单视为主要对象,这就意味着单个菜单可以附着多个元素。
示例代码:
$(fuctio() { var cotext = $('#ode').uCotextMeu({ // Omit items if you are attachig to a sigle cotaier items: '.item', callback: fuctio(key, elemet) { alert('Clicked ' + key + ' o ' + $(elemet).attr('id')); }, // Defie meu items here // key: {...} meu: { 'archive': { title: 'Archive', // Fot awesome icos here ico: 'archive', }, 'mark': { title: 'Mark as read', ico: 'check', }, // If the value is 'separator' the a // <hr> ode is added 'void': 'separator', 'delete': { title: 'Delete', ico: 'trash', }, } }); // Disable cotext meu // cotext.uCotextMeu('disable');});
评论