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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:56:45+00:00 2026-05-27T20:56:45+00:00

I have set up infinite scroll on a website I am building here: http://richardgordoncook.com/fg/

  • 0

I have set up infinite scroll on a website I am building here: http://richardgordoncook.com/fg/

I am using a WordPress plugin for an image gallery, which I’ve manipulated a little to have hover overs of the filenames etc. This all works fine, until the infinite scroll kicks in and any posts after the first page seem to stop using the gallery functionality and really any javascript at all.

Any ideas? You’ll get an idea when you test it out on the site link above.

  • 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-27T20:56:45+00:00Added an answer on May 27, 2026 at 8:56 pm

    The elements added by the infinite scroll need to have the JavaScript events wired to them after they are created. See jQuery’s .live() function for more information on how to do this easily.

    Essentially, you replace

    $('.myclass').mouseover(function(){})
    

    with

    $('.myclass').live('mouseover', function(){});
    

    And jQuery will automatically wire up all the extra events after the new dom elements are added to the page.

    UPDATE

    Ok, forget the .live() approach. It looks like the plugin has a callback function that is raised whenever it adds new new elements to the page.

    $(elem).infinitescroll(options,[callback]);
    

    The callback function is documented as

    function(arrayOfNewElems){
     
         // optional callback when new content is successfully loaded in.
     
         // keyword `this` will refer to the new DOM content that was just added.
         // as of 1.5, `this` matches the element you called the plugin on (e.g. #content)
         //                   all the new elements that were found are passed in as an array
     
    }
    

    You should use this callback to wire up the event handlers to the new elements on the page. It would look something like this

    function(elements)
    {
        $(elements).mouseover(function(){});
        $(elements).mouseout(function(){});
    }
    

    Depending on what you need to do, you may need to use a for loop and iterate over each item individually instead of acting on them as one batch.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have infinite gallery based on this example : http://blog.blundell-apps.com/infinite-scrolling-gallery/ , every thing run
I have an animated rotating ImageButton. <?xml version=1.0 encoding=utf-8?> <set xmlns:android=http://schemas.android.com/apk/res/android > <rotate android:fromDegrees=0
We have set up a SharePoint meeting workspace (using WSS 3.0) for our weekly
I have set up an AJAX contact form on a client's website. The problem
I have a set of points on the infinite (well, double precision) 2D plane.
I have an image that is set to rotate in my application. The code
I use jquery masonry + infinite scroll. I would have the preloading effect with
I am trying to set up infinite-scroll on a site I am developing with
I have a css3 animation running with the iteration count set to infinite. based
I have a categories table which is set up to allow an infinite number

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.