• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

[jQuery] Accordion Hover effect bug

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Heres my full jQuery code for this accordion,



And heres my problem:



I have it set so that when a user moves the mouse off the div.accordionContent the content slides up.
In div.accordionContent there are multiple <a> tags listed, and when i hover over one of these <a> tags that are inside the div.accordionContent,
the content slides up before i get a chance to click on one of the listed <a> links.

So im assuming this is because moving the mouse onto the <a> tag is technically mousing out of div.accordionContent and therefore sliding the list up.

My jQuery syntax knowledge is limited, so i will try explain to the best of my ability what i want to do:
Somehow include the <a> tags in the mouseout function above so that when a user hovers over the <a> tags which are (children of div.accordionContent) the list doesnt slide up,
because it recognizes that they are part of the div.

 
Sheriff
Posts: 67699
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
"Ripz Zipz", please check your private messages for an important administrative matter.
 
Bear Bibeault
Sheriff
Posts: 67699
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
You may want to check out the .hover() method, and perhaps the hoverIntent plugin, which help in dealing with that annoying mouseout behavior.
 
Joe Sheldon
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1st time ever on a forum that ive been called out for a name change
wasnt aware that it was an "important administrative matter".

Cheers for the link to the hoverIntent plugin, looks very interesting and will be using it in future projects.

Thanks
 
Bear Bibeault
Sheriff
Posts: 67699
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

Joe Sheldon wrote:1st time ever on a forum that ive been called out for a name change
wasnt aware that it was an "important administrative matter".


Welcome to JavaRanch.

Cheers for the link to the hoverIntent plugin, looks very interesting and will be using it in future projects.


 
Paddy spent all of his days in the O'Furniture back yard with this tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic