Javascript 在signal R调用中使用jquery的live导致Keyup事件死亡

Javascript 在signal R调用中使用jquery的live导致Keyup事件死亡,javascript,jquery,asp.net,signalr,signalr-hub,Javascript,Jquery,Asp.net,Signalr,Signalr Hub,我正在使用signal R制作示例聊天应用程序,但我的keyup事件已停止。我使用了clone 这是我的示例代码 //keypress event of textbbox here.. $(".ChatText").live('keyup', function () { if($(".ChatText").val().length > 0) { alert('test')

我正在使用signal R制作示例聊天应用程序,但我的keyup事件已停止。我使用了clone 这是我的示例代码

//keypress event of textbbox here..
            $(".ChatText").live('keyup', function () {
                if($(".ChatText").val().length > 0)
                {
                alert('test');
                   var messsage_typing=$("#hdnUserName").val() + " is typing...";
                   var strGroupName = $(this).parent().attr('groupname');
                    if (typeof strGroupName !== 'undefined' && strGroupName !== false)
                        chat.server.send($("#hdnUserName").val() + ' : ' + messsage_typing, $(this).parent().attr('groupname'),"1");

                }
            });
            //end of keypress
这是我的add消息的代码

 chat.client.addMessage = function (message, groupName,recievername,imagetag,Istypingmessage) {

            if ($('div[groupname=' + groupName + ']').length == 0) {
                var chatWindow = $("#divChatWindow").clone(true);
                //also tried this not working 
                //var chatWindow = $("#divChatWindow").clone(true,true);
                $(chatWindow).css('display', 'block');
                $(chatWindow).attr('groupname', groupName);

                $("#chatContainer").append(chatWindow);
                //buggy code do not delete..
                //remove all previous li
                $('div[groupname=' + groupName + ']').find('ul li').remove();
                //replace header tag with new name
                $('div[groupname=' + groupName + ']').find('a').html(recievername);

                $("#chatContainer").draggable();
                $("#chatContainer").css('cursor','move');
            }
请帮我在这里绑定我的keyup事件。。
谢谢

尝试克隆元素的深层副本

var clone = $('.hello').clone(true);

live()
在最新版本的jQuery中已被删除?那么该怎么办?请帮助我解决问题我正在使用jQuery-1.6.4.jsyes,但克隆后不会触发该事件我猜..至少在我的情况下它不起作用..天知道问题出在哪里。。