http://sir.co.kr/bbs/board.php?bo_table=g4_tiptech&wr_id=24690&page=2
이 팁인데요
<script>
this.screenshotPreview = function(){
/* CONFIG */
xOffset = 10;
yOffset = 30;
// these 2 variable determine popup's distance from the cursor
// you might want to adjust to get the right result
/* END CONFIG */
$("a.screenshot").hover(function(e){
this.t = this.title;
this.title = "";
var c = (this.t != "") ? "<br/>" + this.t : "";
$("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
$("#screenshot")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function(){
this.title = this.t;
$("#screenshot").remove();
});
$("a.screenshot").mousemove(function(e){
$("#screenshot")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
};
// starting the script on page load
$(document).ready(function(){
screenshotPreview();
});
현재 좌표가 그 자리에서 오른쪽 아래 인데요
가운데를 중심으로 우측 이나 하단은
왼쪽 위로 툴팁 내용을 출력 하개 변경 할수 있을까요?
이 팁인데요
<script>
this.screenshotPreview = function(){
/* CONFIG */
xOffset = 10;
yOffset = 30;
// these 2 variable determine popup's distance from the cursor
// you might want to adjust to get the right result
/* END CONFIG */
$("a.screenshot").hover(function(e){
this.t = this.title;
this.title = "";
var c = (this.t != "") ? "<br/>" + this.t : "";
$("body").append("<p id='screenshot'><img src='"+ this.rel +"' alt='url preview' />"+ c +"</p>");
$("#screenshot")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px")
.fadeIn("fast");
},
function(){
this.title = this.t;
$("#screenshot").remove();
});
$("a.screenshot").mousemove(function(e){
$("#screenshot")
.css("top",(e.pageY - xOffset) + "px")
.css("left",(e.pageX + yOffset) + "px");
});
};
// starting the script on page load
$(document).ready(function(){
screenshotPreview();
});
현재 좌표가 그 자리에서 오른쪽 아래 인데요
가운데를 중심으로 우측 이나 하단은
왼쪽 위로 툴팁 내용을 출력 하개 변경 할수 있을까요?
댓글을 작성하시려면 로그인이 필요합니다.
댓글 5개
검색하고 있었는데.....
정말이요 감격 입니다 저도 검색 한게 있는데
이게 html 전용 인데 img 로 바꾸기가 여간 -0-a;
http://www.javascriptkit.com/script/script2/ajaxtooltip.shtml
이것인데 이것은 img 로 바꾼면 좋은텐데 머리가 안 돌아 가네요 ~^^;;