// JQuery右键菜单插件
$(function () {
context.init({preventDoubleContext: false});
context.settings({compress: true});
context.attach('#chat-view', [
{header: '操作菜单',},
{text: '清理', action: clearConsole},
{divider: true},
{
text: '选项', subMenu: [
{header: '连接选项'},
{text: '检查', action: checkConnection},
{text: '连接', action: getConnection},
{text: '断开', action: closeConnection}
]
},
{
text: '销毁菜单', action: function (e) {
e.preventDefault();
context.destroy('#chat-view');
}
}
]);
});