Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Close DIV Popup When it Looses Focus

 
Steve Dyke
Ranch Hand
Posts: 1679
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a link:hover to open a DIV using jQuery to load DIV with a table of options.

I need this DIV to stay displayed only while the cursor is within the boundries of the DIV.

I have tried to set onmouseout event to DIV that gets loaded but the DIV disappears(I suppose the onmouseout is fired) when I move the mouse from the calling link to the option table.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out .hover().
 
Steve Dyke
Ranch Hand
Posts: 1679
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bear Bibeault wrote:Check out .hover().


The following works great when I run it by itself. However, when I load it into a DIV tag using jQuery.load the hover will display the option correctly but when I move the cursor off of the hover item to move down the option list the options disappear.

 
Steve Dyke
Ranch Hand
Posts: 1679
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out. I put the hover on the ul instead of the li tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic