picture follow mouse in a <div>
<p>how can i make a picture follows mouse in a specific <strong><code>&lt;div&gt;</code></strong>. </p>

<p>i know that i can get mouse position from <code>e.pageX &amp; e.pageY</code> and with this code <code>document.onmousemove = followmouse;</code> run <code>followmouse</code> function every moment mouse move in page and in <code>followmouse</code> function set picture position to mouse position. for exact question i asked here (how can i make a picture follows mouse in a specific <strong><code>&lt;div&gt;</code></strong>), i have this idea:</p>

<p>get my div top,left,width,height and do some math and if mouse go out of div set <code>visibility:hidden</code> for picture</p>

<p><strong>but isn't any simple way to do this?</strong></p>
