0

Hello,

I'm seeking an onmouseover event to detect when the mouse hovers the top of the webpage. I'm only able to find onmouseover events for the whole page. How to restrict to just the very top of the page?

Need only support modern browsers, simplest method possible.

Thx!

(also asked on codingforums.com and stackoverflow)

Edited by johnywhy

4
Contributors
3
Replies
20
Views
1 Year
Discussion Span
Last Post by almostbob
0

What is the top of the page for you ? How do you define it ?

The statement that you asked elsewhere as well has nothing to do with increasing the possibilities of getting an answer , it rather declines those.

1

To do so, you must attach the onmouseover event to the element on the top of your page. In other words, you must design your page layout, such that your page is divided into sections. Once you have a layout, then attach the event to only element you want the event to be triggered.

0
<html>
<head>
</head>
<body>
<div style='top:0;position:fixed;z-index:30;' onmouseover='whatever;'>
Inline styles and javascripts are bad mkay
but this div will remain at the top of the page
and do whatever on mouseover</div>
<div>
This is content
</div>
</body>
</html>

With compliments to Taywin

Edited by almostbob

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.