content (wrapper) fadeout on menu-item hover
-
hi there
i try to fade out the content-container (wrapper) when mouse hovers a navigation-menu-link with this small script, what i put in responsive-theme-options/individual scripts at footer:
<script> $("li.menu-item").hover( function () { $(wrapper).fadeOut(100); }, function () { $(wrapper).fadeIn(500); } ); </script>
but why does it not work?
test with a small html-file with the same script works fine<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="description" content=""> <meta name="keywords" content=""> <title></title> <style> #wrapper { text-align:center; color:#fff; float:left; margin:5px; width:100px; height:100px; background-color:#000000; } </style> <script src="http://code.jquery.com/jquery-latest.js"></script> </head> <body> <li class="menu-item"><a href="">link</a></li> <div id="wrapper">here is the content</div> <script> $("li.menu-item").hover( function () { $(wrapper).fadeOut(100); }, function () { $(wrapper).fadeIn(500); } ); </script> </body> </html>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘content (wrapper) fadeout on menu-item hover’ is closed to new replies.