Hi
I am bran new at JQuery and need some assistance with something probably very simple:
I would like to display an image and on moueover or mouseenter want to fade the pic completely to show a div with text in it.
On mouseleave would like to unfade the pic to now hide the text.
Here is what I have so far the mouseenter works but the last part not so much. Any help would be greatly appreciated. I ultimately am planning on having 4 different images and text divs on the same page
- <html>
- <head>
- <style>
- p { width:120px; margin:0; padding:5px; }
- div { width:250px; height:250px; position:absolute; }
- div#one { top:0; left:0; background-image: url(../../../img/eye.png)}
- </style>
- <script src="http://code.jquery.com/jquery-latest.js"></script>
- </head>
- <body>
- <p>This is my sample text</p>
- <div id="one"></div>
- <script>
- $("div").mouseenter(function(){
- $(this).fadeTo("slow", 0.11);
- }).mouseleave(function(){
- $("div").fadeIn(3000);
- });
- </script>
- </body>
- </html>