안녕 하면 경고를 얻을 것이다 rightclick
에이 데모를 여기 http://jsfiddle.net/UeqBk/for_Dooonot_from_Tats_innit/
http://jsfiddle.net/hYJPv/1/또는http://jsfiddle.net/hYJPv/ (고정 문제) 또는 사랑하는 방법을 참조하십시오.
코드
$(document).ready(function()
{
// If you want to disable showing the context menu when right clicking
// on the document, the code below would do the trick.
$(document).bind("contextmenu",function(e)
{
alert('right click capture');
return false;
});
var $tree = $("#tree").kendoTreeView(
{
select: function (event)
{
var $item = $(event.node);
console.log($item);
alert("selected");
}
});
// Find the item you want to select...
var $selected = $('#selected');
var $treePath = $selected.parentsUntil($tree, "li");
var treeView = $tree.data('kendoTreeView');
// Expand the tree in order to show the selected item
treeView.expand($treePath);
// Gotta make both calls...
treeView.select($selected);
treeView.trigger('select', {node: $selected});
});
이 안녕, 난 당신이 당신의 오른쪽 클릭을 당신을 위해 그 일을 캡처하는 아주 간단한 jsfiddle을 줄 수 있습니까? 제발, 당신에게 맞는 브루브가 트리 뷰를 사용하여 대답을 업데이트한다면, 저에게 알려주십시오. 좋은 것을 가지고 있습니다 :) cheerios! –
예, 아주 좋을 것입니다. 1 분만주세요. 위의 트리 뷰를 추가하겠습니다! Btw, jquery-treeview 사용하고 있습니다. – doonot
Saweet 김미 2 분! cheerios bruv! –