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

  • Home
  • SEARCH
  • 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 8100073
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:38:41+00:00 2026-06-05T22:38:41+00:00

I have a two column site layout that has the content of the left

  • 0

I have a two column site layout that has the content of the left column as absolute and the div in the right column as fixed. I am trying to get it so that as I scroll down the page and the fixed div box scrolls past anchor points (on the left), the content of the fixed div will change (images will be appended).

The very loose weave jquery I have so far is this:

(function ($) {
  $(document).ready(function () {  
    var anchor = $("")
    var code = 
    $(window).scroll(function (event) {
      var y = $(this).scrollTop();
      if (y >= anchor) {
        $('#theDiv').append('<img id="livecodeimg" src="' + code +'.png" />')
      } else {
        $("#test img:last-child").remove()
      }
    });
  });
})(jQuery);

I’m having trouble figuring out what to make the variables…

  • 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-05T22:38:43+00:00Added an answer on June 5, 2026 at 10:38 pm

    You need to iterate over each a tag and check whether you have passed it in the scroll.

    (function ($) {
        $(document).ready(function () {
            var anchor = $("")
            var code = 
            $(window).scroll(function (event) {
                var y = $(this).scrollTop();
                $('a').each(function() {
                    if (y >= $(this).offset.top) {
                        $('#theDiv').append('<img id="livecodeimg" src="' + code +'.png" />')
                    } else {
                        $("#test img:last-child").remove()
                    }
                });
            });
        });
    })
    

    Hope this helps.

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

Sidebar

Related Questions

I have a two column layout: http://jsfiddle.net/KqQ42/1/ Now I would like that the left
I have a Rails-based site with a basic two-column layout. On the right is
I have two tables: object that has object_id column and avalues that have object_id
My site has three columns. I have two fields within a form that need
I have a site that utilizes a bottom fixed position masthead here: http://www.entheospartners.com/newsite/ This
I am using Cassandra to store my parsed site logs. I have two column
I have two jquery scripts on one page that both target on-site links via
I have two tables/entities client and site that have a many to many relationship
I have a main MasterPage which has a single column layout for the web
I have lots of content that needs to be published on a web site

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.