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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:06:40+00:00 2026-05-24T00:06:40+00:00

I have a page which loads its inner content using jquery and a simple

  • 0

I have a page which loads its inner content using jquery and a simple navigation menu. Because of this there is only one regularly accessed URL for the page. My problem is that I can’t seem to get content from within the loaded div to modify ‘that’ particular div. For example I have something along the lines of this as my jquery loader function:

$(document).ready(function(){

// load index page when the page loads
$("#response").load("start.html");
$("#home").click(function(){
// load home page on click
    $('#response').load('start.html', function() {
        resizefunc();
    });
});
...

If I create an element within one of the loaded pages that links to # with an id from that loader function, clicking it simply moves the focus back to the top of the page rather than reloading my “response” div.

  • 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-24T00:06:41+00:00Added an answer on May 24, 2026 at 12:06 am

    Since those navigation elements (ie #home) don’t exist initially, binding those events on ready will do you no good. You’ll need to live bind those same events or delegate them from a parent element.

    This can easily be showcased by doing this simple test:

    alert($("#home").length);
    

    Which will alert 0


    Try this solution instead

    $(document).ready(function(){
        $("#response").load("start.html");
        $("#home").live("click", function(){
            $('#response').load('start.html', function() {
                resizefunc();
            });
        });
    });
    

    or

    $(document).ready(function(){
        $("#response").load("start.html");
        $("#response").delegate("#home", "click", function(){
            $('#response').load('start.html', function() {
                resizefunc();
            });
        });
    });
    

    using live or delegate to bind this selector to a click rather than a regular click event will allow the assigned function to exist for all selected elements that exist now and may exist in the future.

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

Sidebar

Related Questions

I have a page which dynamically loads a section of content via AJAX. I'm
I have a jsp page which should load a popup using ajax. The content
I have an ASP page which displays a text box when it loads. It
I have a web page which loads in two different ways; user can click
I have a menu made with HTML, using a simple UL with lots of
I have an xml file which I imported in my html page like this:
I have a dropdownlist (on Page) which has OnSelectedIndexChange event thats Loads different Control
I have a page on which I must load controls dynamically based on the
I have some controls on the page which are Invisible on page load. But
I have page which is redirected from htaccess. now I can pass the German

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.