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 6087375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:51:49+00:00 2026-05-23T11:51:49+00:00

I am using a combination of Drupal Views, ajax and the hoverIntent plug-in to

  • 0

I am using a combination of Drupal Views, ajax and the hoverIntent plug-in to display content. Problem is, after an ajax request the ‘hoverIntent’ event is no longer bound to the my selector (in this case each row of the view). Does anyone have a solution to this?

Link to plug-in uncompressed hoverIntent js

hoverIntent home page

My code below–

hoverIntent: This expands a row if you’re cursor is over it and at the same time collapses all other rows.

$('.view-latest-new .views-field-field-story-lead-image-fid').addClass('expand');
var config = {
    over: function() {
         var expand = $(this).find(".expand");
         if(expand.css("display") == "none")
         {
            $(".expand").slideUp("fast");
            $(this).find(".expand").slideDown("fast");
         }
    }, 
    out: function() {
    }
};
$('.view-home .views-row').hoverIntent(config);

EDIT: Ajax:

    var container = $('#content-inner');

    $('#block-menu-secondary-links a').bind('click', function(){
        var trigger = $(this);
        var arg = trigger.attr('title');

        doAjax(arg,container);
        return false;
    });

    function doAjax(arg,container){
        $.ajax({
            url: 'views/ajax?view_name=home&view_display_id=page_1&view_args'+arg,
            timeout:5000,
            success: function(data){
                var result = Drupal.parseJson(data);
                updateContainer(result.display);
            },
        });
    };

    function updateContainer(content){
        container.html(content);
        $('.view-latest-new .views-field-field-story-lead-image-fid').addClass('expand');
        $('.view-latest-new .views-row').hoverIntent(config);
    }

Thanks!

EDIT 2: I’ve found a solution; by adding $('.view-home .views-row').hoverIntent(config); into the updateContainer function. I’m not sure if this is the best way to go about it though. But it works.

  • 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-05-23T11:51:49+00:00Added an answer on May 23, 2026 at 11:51 am

    Solution:

    I have moved the ‘hoverIntent’ event into it’s own function. Which then I have called when the document is ready and also after the ajax request has completed.

        function hoverInit() {
            $('.view-latest-new .views-field-field-story-lead-image-fid').addClass('expand').parent().hoverIntent(config);
        }
    
        hoverInit();
    
        function updateContainer(content){
            container.html(content);
            hoverInit();
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My company develop web apps using combination of mod_perl, axkit and apache. We have
I'm currently using a combination of CSS and Div tags to achieve rounded corners
I'm using the combination of json_encode (PHP) and JSON.parser (Javascript from json.org) for passing
In the application I'm writing using a combination of development environments and languages, I
I am trying to create a simple mouseover effect using a combination of mouseover,
I am trying to make a search function using the combination of DOM, PHP
All these years i have been successfully using EnumServicesStatus in combination with OpenScManager (with
Usually Flash and Flex applications are embedded on in HTML using either a combination
How do I pass a certain key combination to a spawned/child process using the
I'm using .class1.class2 .class3 selector, where .class1.class is a combination selector and .class3 belongs

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.