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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:16:29+00:00 2026-06-13T13:16:29+00:00

jquery.noConflict doesnt work for some reason when loading from an exernal file using php

  • 0

jquery.noConflict doesnt work for some reason when loading from an exernal file using php includes? aslo noticed that maybe some scripts arent fully loading as well?


mainfile.php

<script type="text/javascript" src="js.jquery/jquery.1.8.2.min.js"></script>

<?
include 'extrn_file.php';
?>

// end

//extrn_file.php

<script type="text/javascript" src="js.jquery/jquery.1.3.2.min.js"></script>
<script> $jq132 = jQuery.noConflict(true); </script>
<script type="text/javascript" src="js/animate.js"></script>

<script type="text/javascript">
execute_skills_doc();

function execute_skills_doc(){
$jq132(document).ready(function() {
alert("yes");//nothing happens
});

}

//end

  • 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-13T13:16:29+00:00Added an answer on June 13, 2026 at 1:16 pm

    If you want to use multiple version of jQuery on the same page you have to noConflict() the first before you load the second. Since your PHP include just pulls the contents of the two files together, you are ending up with:

    <script type="text/javascript" src="js.jquery/jquery.1.8.2.min.js"></script>
    <script type="text/javascript" src="js.jquery/jquery.1.3.2.min.js"></script>
    <script> $jq132 = jQuery.noConflict(true); </script>
    

    What you really want would be:

    <script type="text/javascript" src="js.jquery/jquery.1.8.2.min.js"></script>
    <script type="text/javascript"> 
        // set version 1.8.2 to variable and remove globals
        $jq182 = jQuery.noConflict(true); 
    </script>
    <script type="text/javascript" src="js.jquery/jquery.1.3.2.min.js"></script>
    <script type="text/javascript">
        // return jQuery version
        function getVersion(jq){
            return jq().jquery;
        }
    
        // set version 1.3.2 to variable and remove globals
        $jq132 = jQuery.noConflict(true); 
        // reset jQuery variable to 1.8.2
        jQuery = $jq182.noConflict();
    
        // your code that uses $ variable and jQuery 1.3.2
        (function($){
            $(document).ready(function(){ alert('Using $ v'+getVersion($)+'!'); });
        })($jq132);
    
        // your code that uses $ variable and jQuery 1.8.2
        (function($){
            $(document).ready(function(){ alert('Using $ v'+getVersion($)+'!'); });
        })($jq182);
    
        // your code that uses jQuery variable and jQuery 1.8.2
        jQuery(document).ready(function(){ alert('Using jQuery v'+getVersion(jQuery)+'!'); });
    
    </script>​
    

    At this point you will have version 1.8.2 loaded into the $jq182 and jQuery variables and 1.3.2 loaded into the $jq132 variable. The code above will alert the variable used and version of each. You can see an example using the Google API hosted libraries here: http://jsfiddle.net/2kX3E/

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

Sidebar

Related Questions

I'm currently using two libraries (prototype and jQuery), thus I've implemented the jQuery noConflict
I'm using the following code to load in content: <script type=text/javascript> jQuery.noConflict(); jQuery(document).ready(function(){ jQuery('.content-div').load(all-events.html);
I use iepngfix.htc for png in IE6 and jQuery(noConflict mode). iepngfix.htc doesn't work with
I have this file from the theme of my Magento store: http://www.princessly.com/js/jquery/jquery-1.4.2.min.js And someone
I have a php page where I add and delete items from database using
I have problem to send value from php to jQuery script. PHP looks like
I am trying to use jQuery in a highly conflict environment. .noConflict() doesn't work
I know you can do it for jQuery using jQuery.noConflict. Is there a way
I have rows loaded from the database via ajax using jquery. It grabs a
I know there exists a command like jQuery.noConflict. But for this it first registers

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.