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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:55:36+00:00 2026-05-26T20:55:36+00:00

Now I am creating a few plugins for WordPress. All need to work separately,

  • 0

Now I am creating a few plugins for WordPress. All need to work separately, but I want to add an implementation to have them work together.

For starters, all the script will use a custom name to reference jQuery, that is the first part where my problem start. In WordPress I have a combined object that I want to populate with all the values. The combined object is named: myObject.

Now I try this but it does not work:

if( typeof myObject.jq !== 'undefined' )
    myObject.jq = jQuery.noConflict();

myObject.jq(document).ready(function(){

}

I get the error message ‘myObject.jq’ is not a function.

I want to further expand this with a combined ajax function, like this

if( typeof myObject.jq !== 'undefined' ){
    myObject.jq = jQuery.noConflict();

    myObject.ajaxcall = function(action){
        var dfr = myObject.jq.Deferred();
        myObject.jq.ajax({
            url:myObject.ajaxurl,
            type:'post',
            data:{
                action:action,
                face:myObject.face
            },
            dataType:'json',
            success:dfr.resolve
        });
        return dfr.promise();
    };
}

myObject.jq(document).ready(function(){
    // My code here
}

This completely does not work. Anyone have any idea how I can get this working?

  • 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-26T20:55:37+00:00Added an answer on May 26, 2026 at 8:55 pm

    You just have the ‘undefined’ logic backwards. You should say typeof myObject.jq === 'undefined'. Although, since jq is expected to be a function, the better check would be typeof myObject.jq !== 'function'.

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

Sidebar

Related Questions

Having worked with Classic ASP for about 2 years now by creating a few
I have a cakePhp application built, and now I'm creating a simple blog based
I'm creating my own script using the CodeIgniter MVC framework. Now, i want users
I'm using html2fpdf for creating PDF documents. Now once I have created that, I
So I am creating a database and I have a few questions because I
So I'm creating a few webapps that need to be tested over our local
I'm creating my own templatesystem because I only need a few little operations to
I have over the course of a few projects developed a pattern for creating
I have created an applet program using Eclipse IDE. Now im creating .html file
I have a few select elements that are grouped by a span. I'm creating

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.