Waseem
Waseem

Reputation: 111

onmouseover and onmouseout don't work in firefox

I'm trying to change a CSS attribute by using a java-script function so This code is not working in firefox / works with Safari/Chrome

<html>
    <head>
        <style type="text/css">
         #hide {
            display: none ;
         }
        </style>
    </head>
    <body>
         <div onmouseover="document.getElementById('hide').style.display = 'compact';" onmouseout="document.getElementById('hide').style.display = 'none';" >
            Move Over Mouse here
         </div>
         <div id="hide"> THIS IS HIDDEN TEXT</div>
    </body>
</html>

Any Ideas ?!

Upvotes: 0

Views: 1571

Answers (1)

Jim Blackler
Jim Blackler

Reputation: 23169

Try display style 'inline' rather than 'compact'.

Upvotes: 2

Related Questions