How to keep things displayed onmouseout
Hi,
I am trying to build this interface where I have some icons on the page. When user hovers mouse on one, it displays a corresponding section with some menu options (icons) - that I need to hide if user goes over another icon (and display this icons corresponding menu options.
The problem is - I also need to keep a section visible if mouse pointer is on it. But since I am using onmouseout, as soon as I try to move mouse and click on a menu option, it disappears.
Here's my code:
- <img id="imgHead1" src="images/abc.ico" alt="Info Center" />
- <div id="imgH1div1" style="width:300px; height:150px;margin: 100px 0 0 80px; " >
- <img id="imgH1image1" src="images/abc_img1.gif" alt="Create Event" />
- </div>
- ........
- <script type="text/javascript">
- var parent1 = $('#imgHead1');
- var childs = $('div');
- childs.hide();
- parent1.hover(function(){
- parent1.next('div').animate({opacity: "show", top: "-75"}, "slow");
- },function(){
- parent1.siblings('div').animate({opacity: "hide", top: "-85"}, "slow");
- })
- </script>
How can I achieve this? Thanks.