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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:05:30+00:00 2026-06-18T14:05:30+00:00

I am loading an entire middle div via JQuery Ajax call and I simply

  • 0

I am loading an entire middle div via JQuery Ajax call and I simply want to run $(document).ready on the loaded page

header.php loads part of the page

var $next = $("<div class='nextab center'>").insertAfter('#content .current');
        $next.load($this.attr('href')+ ' #content .center section' , function(resp) { ...

}

so for example when header.php loads career.php it does not run all the code that is inside the $(document).ready(function(){ that is on career.php

I was thinking of creating a function init on each page loaded but not sure how to call this function from the load callback

Thanks

  • 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-18T14:05:31+00:00Added an answer on June 18, 2026 at 2:05 pm
    function YourActionOnDocumentReady(){
       // write whatever you want to do     
    }
    

    And in document ready call the above function

    $(document).ready(function(){
        YourActionOnDocumentReady();
    });
    

    And use ajaxStop function to run the same code

    $(document).ajaxStop(function(){
         YourActionOnDocumentReady();
    });
    

    Hope it helps…

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

Sidebar

Related Questions

I would like to display a loading bar before the entire page is loaded.
I want to fetch the id of a one-to-one relationship without loading the entire
On loading the page I want to pass a value to my javascript function
Hi I'm trying to tokenize a string by loading an entire file into a
I've seen a bunch of articles relating to loading the entire Rails environment for
Is there a way to define eager loading per entire data context, so I
For some reason EF is loading my entire object graph. I have lazy loading
I'm looking for a .NET XPathNavigator that can read XML without loading the entire
I want to read a large file (>5GB), line by line, without loading its
Apparently, according to this you cannot query a many relationship without loading the entire

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.