• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Close DIV Popup When it Looses Focus

 
Ranch Hand
Posts: 2202
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67735
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check out .hover().
 
Steve Dyke
Ranch Hand
Posts: 2202
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 2202
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured it out. I put the hover on the ul instead of the li tag.
 
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic