开发者

How to re init context menu?

The jquery context menu works fine if I assign it first time. But when I re-assign it second time context menu works with previous function.

Code with first time:

$("#26134_x16Fwj2VUp8Sa74").contextMenu("rowContMenu_26134_x16Fwj2VUp8Sa74", 
{bindings: 
        { 'itemQuickEdit_26134_x16Fwj2VUp8Sa74' : function(t) 
                { 
                showQuickEditForm(26134,'x16Fwj2VUp8Sa74'); 
                }
        }
}); 

Code with second time:

$("#26134_x16Fwj2VUp8Sa74").contextMenu("rowContMenu_26134_x16Fwj2VUp8Sa74", 
{bindings: 
        { 'itemQuick开发者_StackOverflow社区Edit_26134_x16Fwj2VUp8Sa74' : function(t) 
                { 
                **showFullEditForm**(26134,'x16Fwj2VUp8Sa74'); 
                }
        }
});

So I think it have to be function like re-init. ($.removeData etc...)


Have you tried ?

$("#26134_x16Fwj2VUp8Sa74").unbind().contextMenu("rowContMenu_26134_x16Fwj2VUp8Sa74", 
{bindings: 
        { 'itemQuickEdit_26134_x16Fwj2VUp8Sa74' : function(t) 
                { 
                **showFullEditForm**(26134,'x16Fwj2VUp8Sa74'); 
                }
        }
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜