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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T01:38:36+00:00 2026-05-19T01:38:36+00:00

I have a custom developed WordPress plugin that is using jQuery 1.4 and for

  • 0

I have a custom developed WordPress plugin that is using jQuery 1.4 and for some reason it is conflicting with the core of the WordPress js code… not sure, but I think it’s also jQuery, no?

Anyway, I assumed it was this datepicker script I was using called “anytime.js” however, after debugging it turns out that the conflict was still happening after removing the link within the plugin to “anytime.js” but finally resolved when I got rid of the link to jquery.1.4.min.js …

So, Any ideas for how to avoid the conflict? Is WordPress jQuery-based and that’s the cause or is it something else?

Here’s the relevant code found within the plugin:

function datepicker_header(){
    $theme_dir = get_bloginfo('wpurl').'/wp-content/plugins/postevents/js/';?>

    <link rel="stylesheet" type="text/css" href="<?=$theme_dir?>anytime.css" />
    <link rel="stylesheet" type="text/css" href="<?=$theme_dir?>ui.css" />

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type='text/javascript'></script>
    <script src="<?=$theme_dir?>anytime.js" type='text/javascript'></script>

    <script type="text/javascript">
        $(function(){
            AnyTime.picker( "startdate", { format: "%m-%d-%Y", firstDOW: 1, baseYear: '<?=date('Y')?>', earliest: '<?=date('m-d-Y')?>' } );
            AnyTime.picker( "enddate", { format: "%m-%d-%Y", firstDOW: 1, baseYear: '<?=date('Y')?>', earliest: '<?=date('m-d-Y')?>'  } );
        });
    </script>

EDIT

I think I may have caused some confusion. I should explain functionality. There is a plugin called “Post Events” that has a jQuery based datepicker. The datepicker relies on jQuery to run. The specific and unusual problem is that while the plugin is active, it causes the new WordPress 3.0 draggable menus to fail from the WP admin panel. All other functionality is working, however, disabling the datepicker does not result in the menus becoming draggable. Instead, only deleting the link to “/libs/jquery/1.4.2…” in the code above causes the menus to become draggable again.

EDIT #2

While I can only indicate one correct answer, both @Matthew as well as @polarblau‘s corrections below were required to fix the problem!

  • 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-19T01:38:37+00:00Added an answer on May 19, 2026 at 1:38 am

    This code will check to see if jQuery is already loaded… then loads it if it’s not already (this code loads from Google code – you can update the URL to a local file if you like).

    if(typeof(jQuery)=='undefined'){
        var loadjQuery = document.createElement("script");
        loadjQuery.setAttribute("type","text/javascript");
        loadjQuery.setAttribute("src","http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js");
        document.getElementsByTagName("head")[0].appendChild(loadjQuery);
    }
    

    I do have to note, however, that this will only work if loaded AFTER another potential instance of jQuery (there’s no guarantee that an instance of jQuery won’t be loaded later, unless it performs this same check).

    This is useful in situations where jQuery is loaded SOMETIMES and you need it to ALWAYS be loaded, no matter what. In that case, place this code at some point after the original would have loaded, but before you use any jQuery functionality.

    One more thing: I sometimes WordPress gets fussy with the $ in jQuery code. You can get around this by simply typing out ‘jQuery‘ (or performing a find/replace) instead of $ anywhere the $ is needed.

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

Sidebar

Related Questions

I'm using the anytime.js datepicker library of a WordPress plugin that was custom-developed for
I have some namespaced custom tags(developed with radius gem) that i would like to
at our company we have some drupal projects that share some custom developed modules,
I have an custom addon developed for our workplace (using the add-on SDK) that
I have developed a custom dijit Templated Widget. I have to do some DOM
I have developed a custom target, that needs to run only if the compilation
I have a custom developed CMS where users can enter some content into a
We have developed a custom control in monotouch (inherited from UITextField, but that shouldn't
I have developed a WordPress plugin which needs to perform additional processing when a
I have a wordpress site that was built for me by a developer some

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.