LoginSignup
0
0

jQueryでツールチップ(リンクにマウスオーバーで文字と透過ボックス)を作る方法

Posted at

リンク文字にマウスオーバーしたときに、透過ボックスと文字をツールチップで表示する方法

$(function() {
$("span.tooltip").css({
opacity:"0.9",
position:"absolute",
display:"none"
});
$("a").mouseover(function() {
$("span.tooltip").fadeIn();
}) .mouseout(function() {
$("span.tooltip").fadeOut();
}).mousemove(function(e){
$("span.tooltip").css({
"top":e.pageY+10+"px",
"left":e.pageX+10+"px"
});
});
});

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0