[英]Jquery contextmenu with bootstrap 3 glyphicons
Have any one tried jQuery-contextMenu with Bootstrap icons? 有没有尝试过带有Bootstrap图标的jQuery-contextMenu ?
Sample JS code: 样本JS代码:
$(function(){
$.contextMenu({
selector: '.context-menu-one',
items: {
"edit": {name: "Edit", icon: "glyphicon glyphicon-edit"},
"cut": {name: "Cut", icon: "cut"},
"copy": {name: "Copy", icon: "copy"},
"paste": {name: "Paste", icon: "paste"},
"delete": {name: "Delete", icon: "delete"},
"sep1": "---------",
"quit": {name: "Quit", icon: "quit"}
}
});
});
is there any other way to create multilevel contextMenu in bootstrap?? 还有其他方法可以在引导程序中创建多级contextMenu吗?
You can change the css in the jquery.contextMenu.css for the icon as specified in Use Font Awesome Icons in CSS 您可以在jquery.contextMenu.css中更改图标的css,如CSS中的“ 使用字体真棒图标”中所指定的
Here is an example 这是一个例子
Original 原版的
.context-menu-item.icon-edit {
background-image: url(images/edit.png);
}
New 新
.context-menu-item.icon-edit {
position: relative;
}
.context-menu-item.icon-edit:before {
content:"\270f";
font-family: "Glyphicons Halflings";
left: 5px;
position: absolute;
top: 5;
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.