Hiding Div tag on mouseleave
Hi all,
I am trying to display content when mouseenter the div tag with id="test" when mouseleave i want to hide the contents.It was working fine only once. I want it to repeat that when ever mouseenter or mouseleave.
Could any one help me please.....
Test1.txt contains - just text
- <html>
- <head>
- <style>
- div #load{
- float :right;
- border: 1px solid gray;
- }
- </style>
- <script type="text/javascript" src="jquery-1.4.2.js"></script>
- <script type="text/javascript">
- $(document).ready(function(){
-
- $("#test").mouseenter(function(){
- $('#load').load('test1.txt');
- });
-
- $("#test").mouseleave(function(){
- $('#load').hide()
- });
- });
- </script>
- </head>
- <body>
- <div id="test">
- <h2>Click to let AJAX change this text</h2><div id="load"/>
- </div>
- </body>
- </html>