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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:06:05+00:00 2026-05-24T10:06:05+00:00

I am trying to make a Redmine plugin that uses jquery. I get conflicts,

  • 0

I am trying to make a Redmine plugin that uses jquery.

I get conflicts, when I add the following line in my view:

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

Uncaught TypeError: Cannot call method 'hasChildNodes' of undefined
prototype.js:5734
Uncaught TypeError: Object [object Object] has no method 'dispatchEvent'
prototype.js:828
Uncaught TypeError: Object [object Object] has no method 'attachEvent'

The view is a hook.

If I remove the <script src=""> , it works, but then I have no jQuery to use.

  • 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-24T10:06:07+00:00Added an answer on May 24, 2026 at 10:06 am

    Looking at it, the prototype library is also loaded. Usually a library will automatically load into the global scope by assigning themselves to the $ variable.

    To get jQuery working, just add $.noConflict(); after you load jQuery (see noConflict on the jQuery API). This unloads jQuery from $ and reassigns it to what it was before (prototype).

    Then you access jQuery using the jQuery object and not the $ shortcut.

      jQuery(document).ready(function($) {
        // Code that uses jQuery's $ can follow here.
      });
    

    If you really wanted to use a shortcut variable (for example, $j), then you can assign it when doing the noConflict:

    var $j = $.noConflict(); // Then use $j instead of $
    

    Alternatively, you can create an anonymous function and assign jQuery to $ within it. This is only done within the scope of the function (so prototype is still $ outside of the scope):

    (function($) { 
      $(function() {
        // more code using $ as alias to jQuery
      });
    })(jQuery);
    

    All of these (and a few other examples) are shown on the noConflict page – so you might want to have a look there.

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

Sidebar

Related Questions

Trying to make a make generic select control that I can dynamically add elements
Trying to make simple jQuery function to create a scrollToTop button that fades in
trying to make a .bat script, and need to get some strings working properly.
Trying to make a MySQL-based application support MS SQL, I ran into the following
Trying to make a custom :confirm message for a rails form that returns data
Im trying to make a function that will return an element of type point:
I'm trying make one treeView with infinite subgroups. I can add my groups but
Trying to make a call and retrieve a very simple, one line, JSON file.
Running Ubuntu 10, RVM, Passenger and apache2. Trying to configure and get Redmine running.
Trying to make infoWindows a little less uglier I found out that the infoWindows

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.