From 1c4adc1e389958804bb53dbeea6ceccd83c779a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=BF=E5=8F=AC=E9=98=B3?= Date: Fri, 7 Nov 2014 14:12:17 +0800 Subject: [PATCH] bug fix --- webroot/AutoSa/static/js/main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webroot/AutoSa/static/js/main.js b/webroot/AutoSa/static/js/main.js index 2a4ccb879..ccc137cbe 100644 --- a/webroot/AutoSa/static/js/main.js +++ b/webroot/AutoSa/static/js/main.js @@ -27,8 +27,8 @@ $.fn.webSocket = function(opt){ return new Date().getTime()+""+Math.floor(Math.random()*899+100); }; - var init = function(){ - var node = $(this); + var init = function(e){ + var node = $(e.target); message.id = genUid(); message.filename = node.attr('filename'); @@ -39,8 +39,8 @@ $.fn.webSocket = function(opt){ window.console.log(obj.content); }); } - $this.on("click",function(){ - init(); + $this.on("click",function(e){ + init(e); }); }