0
好吧..所以我正在做一些網格工作,我有幾個功能正在使用。 除了當我點擊一個上下文菜單時它沒有觸發警報,一切正常。 仔細查看文檔。 A 「#Selector」 應該在這裏,而不是文件使用...jQuery的上下文菜單等
// Show menu when #myDiv is clicked
jQuery(document).contextMenu({
menu: 'myMenu'
},
function(action, el, pos){
alert('Action: ' + action + '\n\n');
});
當我改變
jQuery(document).contextMenu({
到
// Show menu when #myDiv is clicked
jQuery("#grid").contextMenu({
這將激活所選上下文alert..But現在當我生成可拖動的容器時
jQuery("#grid").append("<div id='container"+container+"' class='container' style='border: 2px solid black;width:100px;height:100px;position: absolute !important;left:100px;top:"+Math.floor(Math.random()*601)+"px'><p style='background-color:lightblue;margin:0px'>------<span style='background-color:white'>"+container+"</span>------</p><br/>a</div>");
jQuery('#debug_container').html('Container Added');
jQuery('.container').draggable({handle: 'p',grid: [ 8,8 ],
containment: "#grid",
drag: function() {
var currentID = jQuery(this).attr('id').substr(9, 1);
setContainer(currentID);
}
});
它不會讓它進入... 原來將允許下降,但不會提醒。 我想都..
一如既往,任何幫助非常感謝。