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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T04:07:51+00:00 2026-06-13T04:07:51+00:00

I am having issues with using jQuery.noConflict(true) var jq = $.noConflict(true); (function(jq) { var

  • 0

I am having issues with using jQuery.noConflict(true)

var jq = $.noConflict(true);

(function(jq) {
    var jq = $;
    console.log($);
})(_jQuery)

But i keep keep getting errors that its undefined. Is something able to help me pass a value to this function so I can use jQuery ?

Edit: I am trying to run a plugin inside an automatic executing function

(function($) {
console.log($); 

   (function($){

   })(jQuery)

})(jq)

The problem is that the function constantly get undefined ?

  • 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-13T04:07:52+00:00Added an answer on June 13, 2026 at 4:07 am

    I think perhaps you meant to do something like this which removes all jQuery globals, assigns the main jQuery global to your own variable jq, then passes that to a self-executing function which takes an argument named $ so you can then use $ inside of the self executing function as the name for jQuery like this:

    var jq = jQuery.noConflict(true);
    
    (function($) {
        console.log($);
    })(jq);
    

    If what you’re really trying to do is to load multiple versions of jQuery on the same page, you can read this post: Can I use multiple versions of jQuery on the same page?.

    Here’s the principle in execution:

    <!-- load jQuery 1.3.2 -->
    <script type="text/javascript" src="http://example.com/jquery-1.3.2.js"></script>
    <script type="text/javascript">
    var jQuery_1_3_2 = $.noConflict(true);
    </script>
    
    <!-- load jQuery 1.8.2 -->
    <script type="text/javascript" src="http://example.com/jquery-1.8.2.js"></script>
    <script type="text/javascript">
    var jQuery_1_8_2 = $.noConflict(true);
    </script>
    

    Then, to create an environment for your plugin, you can do this:

    (function(jQuery) {
        var $ = jQuery;
        // now both jQuery and $ refer to version jQuery 1.3.2 inside this closure
        // use your plugin that requires 1.3.2 here
    })(jQuery_1_3_2);
    

    If this was my project, I’d spend some effort to figure out how to get all my code to use the same version of jQuery because multiple versions of jQuery slows down the loading of the page, consumes more memory and complicates the development and troublshooting. There is nothing good about it.

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

Sidebar

Related Questions

I'm using jquery isotope to get the 'masonry' effect but having issues. Firstly, the
I'm having issues getting jQuery tooltips (using Tipsy) to work. The tooltips work fine
I am using this plugin: http://malsup.com/jquery/form/#getting-started I am having issues, getting it to submit
I'm using the jQuery plugin Quick Flip, but I'm having two issues with one
I am having issues with loading external javascript using JQuery. Every time when I
I'm having issues getting a jquery .change() event to fire in an Iphone. Code
I'm using the DataTables jQuery plugin and am having issues with the First and
I'm having issues with using the treeTable jquery plugin ( http://plugins.jquery.com/project/treeTable ) inside an
I'm having issues with some jQuery code I have. Using $.each I am looping
I'm using a jQuery plugin called Cycle and I am having issues with the

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.