Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8962561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T16:09:15+00:00 2026-06-15T16:09:15+00:00

I’m having difficulty getting the jQuery special event hoverintent to work with mouseleave functions.

  • 0

I’m having difficulty getting the jQuery special event hoverintent to work with mouseleave functions. (I’ve also tried substituting mouseout for mouseleave)

I need to utilize the same functionality so that the mouseleave event is only fired when the user’s mouse has slowed down beneath the sensitivity threshold.

I’ve included the script below, and have also uploaded a working example to http://click2fit.com/test_files/accordion_hoverintent.html

$(function () {     
    $(".accordion_close_leave").accordion({
                event: "click hoverintent",
                collapsible: true,
                active: false,     
                autoHeight: false,
             }).mouseleave(function() {
    $(this).accordion({ active: false}); 
    });  

var cfg = ($.hoverintent = {
    sensitivity: 100,
    interval: 500
});
$.event.special.hoverintent = {
    setup: function() {
        $( this ).bind( "mouseover", jQuery.event.special.hoverintent.handler );
    },
    teardown: function() {
        $( this ).unbind( "mouseover", jQuery.event.special.hoverintent.handler );
    },
    handler: function( event ) {
        var that = this,
            args = arguments,
            target = $( event.target ),
            cX, cY, pX, pY;
        function track( event ) {
            cX = event.pageX;
            cY = event.pageY;
        };
        pX = event.pageX;
        pY = event.pageY;
        function clear() {
            target
                .unbind( "mousemove", track )
                .unbind( "mouseout", arguments.callee );
            clearTimeout( timeout );
        }
        function handler() {
            if ( ( Math.abs( pX - cX ) + Math.abs( pY - cY ) ) < cfg.sensitivity ) {
                clear();
                event.type = "hoverintent";
                event.originalEvent = {};
                jQuery.event.handle.apply( that, args );
            } else {
                pX = cX;
                pY = cY;
                timeout = setTimeout( handler, cfg.interval );
            }
        }
        var timeout = setTimeout( handler, cfg.interval );
        target.mousemove( track ).mouseout( clear );
        return true;
    }
};
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T16:09:16+00:00Added an answer on June 15, 2026 at 4:09 pm

    It turns out that jQuery’s hoverintent special event code won’t work here because it was designed specifically for inclusion with Accordion’s event option (which is defined as the event that accordion headers react to in order to activate the associated panel).

    The good news is that Brian Cherne’s hoverintent plugin does 😀 I’ve included the script below, and a working fiddle is available here: http://jsfiddle.net/chayacooper/GZV5V/26/

    It’s important to remember to bind the mouseleave to the accordion itself so that it doesn’t get triggered until the user takes their mouse off the entire accordion. There is a small issue with double activation if the user immediately clicks the header when moving into it, but I was willing to accept that in order to be able to use Select elements inside accordions.

    $(document).ready(function() {
    $("#Trigger2").accordion({
        active: false,
        collapsible: true
    }).hoverIntent({
        over: function() {},
        out: function() {
            $('.ui-accordion-header-active', this).trigger('click').blur();
        },
        timeout: 1000
    })
    
    .children('h3').hoverIntent({
        over: function() {
            $(this).not('.ui-accordion-header-active').trigger('click');
        },
        out: function() {},
        timeout: 1000
    });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have just tried to save a simple *.rtf file with some websites and
I am reading a book about Javascript and jQuery and using one of the
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I need a function that will clean a strings' special characters. I do NOT
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.