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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T08:18:16+00:00 2026-05-29T08:18:16+00:00

I am new to jQuery. Basically I have a main page (with jQuery) and

  • 0

I am new to jQuery. Basically I have a main page (with jQuery) and I want to include in a div another page that also has jQuery.
What I do is write in that particular div this code:

<?php
   $path = $_SERVER['DOCUMENT_ROOT'];
   $path .= "/ong/new/index.php";
   include_once($path);
?>

If I do this the jQuery in the child page stops working. The jQuery functions in the main page also stops working, but if I remove this link

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>

from the child page it works in the main page.

So, what am I doing wrong? How should you include a jQuery page in another?

  • 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-29T08:18:17+00:00Added an answer on May 29, 2026 at 8:18 am

    It is because you are including jQuery multiple times. You could make small script to check if jQuery is present on the page, and only if is not present, load it:

    // 'load-jquery.js'
    window.onload = function () {
      if (window.jQuery === undefined) {
        var script = document.createElement('script');
        script.src = 'path/to/jquery.min.js';
        document.getElementsByTagName('head')[0].appendChild(script); // load jQuery
      }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically I have an IFRAME that displays a given page. I am using jQuery
I have application that brings response via Ajax and creates 5-20 new jQuery click
I'd like reposition a div on my website using jQuery. Basically I have a
I have the following jQuery which basically leaves the div at it's normal CSS
I am brand stinking new to jquery and attempting to have a Services page
I am new Jquery and have written a toggle function that looks like this:
When writing a new jQuery plugin is there a straightforward way of checking that
Basically I want to replicate the page changing effect found here, at http://timvandamme.com/ But
I'm sort of new to jquery and I have a toggle type jquery piece
I have a function called testimonials() that basically cycles through a set of divs,

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.