From 9c192f5a9229094075567536b0f82934e67418d5 Mon Sep 17 00:00:00 2001 From: nieguanghui Date: Wed, 4 Dec 2013 15:49:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E7=95=8C=E9=9D=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/welcome/index.html.erb | 62 +++++++++++++++++--------------- public/stylesheets/welcome.css | 35 ++++++++++++------ 2 files changed, 58 insertions(+), 39 deletions(-) diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index 1dd7d4e6d..bb037cbfc 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -94,30 +94,36 @@ } } - // $(function(){ - // var x = 10; - // var y = 20; - // $("span.tooltip").mouseover(function(e){ - // this.myTitle = this.title; - // this.title = ""; - // var tooltip = "
" + this.myTitle + "
"; - // $("body").append(tooltip); - // $("#tooltip") - // .css({ - // "top": (e.pageY + y) + "px", - // "left": (e.pageX + x) + "px" - // }).show("fast"); - // }).mouseout(function(){ - // this.title = this.myTitle; - // $("#tooltip").remove(); - // }).mousemove(function(e){ - // $("#tooltip") - // .css({ - // "top": (e.pageY + y) + "px", - // "left": (e.pageX + x) + "px" - // }); - // }); - // }) + $(function(){ + var x = 10; + var y = 20; + $("span.tooltip").mouseover(function(e){ + this.myTitle = this.title; + this.title = ""; + var tooltip = "
" + this.myTitle + "
"; + $("body").append(tooltip); + $("#tooltip") + .css({ + "top": (e.pageY + y) + "px", + "left": (e.pageX + x) + "px" + }).show("fast"); + }).mouseout(function(){ + this.title = this.myTitle; + $("#tooltip").remove(); + }).mousemove(function(e){ + $("#tooltip") + .css({ + "top": (e.pageY + y) + "px", + "left": (e.pageX + x) + "px" + }); + }); + }) + + // $('li').mouseover(function(){ + // var id=$(this).attr('id'); + // alert(id); + // }); + @@ -126,16 +132,16 @@