Hi all,
I have the following scenario:
<div class="dropMenuWrapper_content">
<img src="images/dropMenu.gif" class="menu_head_content" />
<ul class="menu_body_content scroll-pane" id="SmallDropDown">
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/0.aspx">1</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/1.aspx">2</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/2.aspx">3</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/3.aspx">4</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/4.aspx">5</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/5.aspx">6</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/6.aspx">7</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/7.aspx">8</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/8.aspx">9</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/9.aspx">10</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/10.aspx">11</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/11.aspx">12</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/12.aspx">13</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/13.aspx">14</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/14.aspx">15</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/15.aspx">16</a></li>
<li><a class="modalWindow cboxElement" href="http://mysite.com/service/16.aspx">17</a></li>
</ul>
When I click on the dropMenu image, the list opens up to show me a drop down menu using jQuery. All's working well except when I move off of either the image or the list itself, I need it to close the menu. I already have my function to close the menu when you click on the image again, but I need it close when you move off of the image or the list.
I thought that I could use the dropMenuWrapp_content div to as this stretches with the content when it is open so that when you mouse out of that div it will close but it's very buggy.
In Flash, I would setup a hitTest to see where the mouse is and if it's no longer on that area, the drop menu would close.
Is there a better way for me to check this using jQuery?
Many thanks!