This commit is contained in:
nieguanghui 2013-12-03 09:37:34 +08:00
parent 25fd898623
commit 2b3138f23b
1 changed files with 27 additions and 31 deletions

View File

@ -94,35 +94,31 @@
}
}
$(function(){
var x = 10;
var y = 20;
$("span.tooltip").mouseover(function(e){
this.myTitle = this.title;
this.title = "";
var tooltip = "<div id='tooltip' style='background-color: red;'>" + this.myTitle + "</div>";
$("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 = "<div id='tooltip' style='background-color: red;'>" + this.myTitle + "</div>";
// $("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"
// });
// });
// })
$("span.project_info").live("mouseover", funtion(){
var v = $(this).attr("id");
alert(v);
});
</script>
<!-- info display block -->
<%= stylesheet_link_tag 'welcome' %>
@ -136,8 +132,8 @@
<li class="message-brief-intro" style="min-height: 25px;">
<div style="display: inline-block;">
<span style="color:graydisplay: inline-block; background: url('/images/list-icon.png') no-repeat scroll ;background-position: left center;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%= link_to topic.subject.truncate(25, omission: '...'), forum_memo_path(topic.forum_id,topic.id), :class => "gray" %></span>
<span style="margin-left: 20px; color: green; white-space: nowrap;">
<%= link_to topic.author, user_path(topic.author) %>
<span style="margin-left: 20px; color: green !important; white-space: nowrap;">
<%= link_to topic.author, user_path(topic.author), :style => "color: green;"%>
</span>
<span style="margin-left:20px; color:blue; white-space: nowrap;"><%= time_tag_welcome topic.created_at %>前</span>
</div>