Wie man einen Div an Cursor kleben lässt

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Wie man einen Div an Cursor kleben lässt

by Anonymous » 27 Feb 2025, 11:02

Ich habe ein Skript, das ein DIV auf dem Schwebedruck zeigt und es an den Cursor steckt. < /p>

Code: Select all

$(".picture_holder_thumb").mouseover(function () {
$(".title", this).show();
});

$(".picture_holder_thumb").mouseout(function () {
$(".title", this).hide();
});
$(document).bind('mousemove', function (e) {
$(".title", this).css({
left: e.pageX,
top: e.pageY
});
});
Es funktioniert, aber irgendwie liegt zwischen dem klebrigen div und dem Cursor immer Platz. < /p>

Dies ist das CSS meines Divs: < /p>

#img-container .captioning .title {
width: auto;
height:auto;
position: absolute;
float:left;
z-index:1;
display: none;
}
< /code>

Stimmt etwas mit meinem JS nicht? Ich bin dankbar für jede Hilfe! http://jsfiddle.net/hj57k/

Top