【问题标题】:when I combine I am not able t see the delete button当我合并时,我看不到删除按钮
【发布时间】:2017-08-20 15:20:46
【问题描述】:
- 我将网格移到弹出窗口中。当我点击三个点时,我需要显示删除按钮
- 我可以在单独的时候看到删除按钮。
- 但是当我合并时我看不到删除按钮。
- 你们能告诉我怎么写吗...
在下面提供我的代码和小提琴。
工作小提琴
http://jsfiddle.net/sureshatta/7brbws09/6/
-
不工作的小提琴
http://jsfiddle.net/XY7HT/61/
<div id="grid"></div>
<div class="pai-del-menu">Delete</div>
<script id="delete-confirmation" type="text/x-kendo-template">
kendoWindow.data("kendoWindow")
.content($("#delete-confirmation").html())
.center().open();
$(document).on("click", "#playerDocumentOk", function(){
pai_to_delete.remove();
</script>
【问题讨论】:
标签:
javascript
jquery
html
css
kendo-ui
【解决方案1】:
弹出窗口的z-index 是z-index: 10011;,但您的.pai-del-menu 只是z-index: 999;。只需将其设置为高于10011。例如z-index: 10012;。
或者您可以动态设置它,我建议您这样做,因为我意识到 z-index 是动态设置的:
$('.pai-del-menu').css({
left: pai_x,
top: pai_y,
zIndex: parseInt($('.k-window').css('z-index')) + 1
});
【解决方案2】:
将 z-index 更改为 99999,如下所示:
.pai-del-menu{
padding: 4px;
color: #000;
border-radius: 5px;
background-color: #eee;
width: 80px;
text-align: center;
box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.2), 0 1px 5px 0 rgba(0,0,0,.12);
position: fixed;
z-index: 99999;
cursor: pointer;
}