Commit 1c4adc1e authored by 宿召阳's avatar 宿召阳

bug fix

parent a5abd9d6
...@@ -27,8 +27,8 @@ $.fn.webSocket = function(opt){ ...@@ -27,8 +27,8 @@ $.fn.webSocket = function(opt){
return new Date().getTime()+""+Math.floor(Math.random()*899+100); return new Date().getTime()+""+Math.floor(Math.random()*899+100);
}; };
var init = function(){ var init = function(e){
var node = $(this); var node = $(e.target);
message.id = genUid(); message.id = genUid();
message.filename = node.attr('filename'); message.filename = node.attr('filename');
...@@ -39,8 +39,8 @@ $.fn.webSocket = function(opt){ ...@@ -39,8 +39,8 @@ $.fn.webSocket = function(opt){
window.console.log(obj.content); window.console.log(obj.content);
}); });
} }
$this.on("click",function(){ $this.on("click",function(e){
init(); init(e);
}); });
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment