resolve prototype & jquery conflict with dynamic script loading

I know that I can use

 <script type="text/javascript">
    jQuery.noConflict();
 </script>

to resolve the conflict between prototype and jquery after including all jquery and prototype libraries in the head section. However, I am including another .js file in the head section which dynamically loads a jquery plugin in window.load function. Now I get the conflict. Can someone tell me how to resolve this. Where do I specify the jquery.noConflict()

thanks.

Answers


I suspect it's all in the order:

  1. load prototype
  2. load jquery
  3. run jQuery.noConflict();
  4. load other js file

edit: oops, you need to include prototype first. (ref)


Where do I specify the jquery.noConflict()

You should put jQuery.noConflict(); just after the line where jQuery library is included.


Load the main jQuery file first of all your .js files.

Then insert the noConflict() - block directly after you load the jQuery library (before any other script files).


Need Your Help

Proper Memory allocation

c memory struct hashtable allocation

I have the following construction:

Cant change radio button selection - KnockoutJS

javascript knockout.js radio-button

I am quite new to KnockoutJS and have noticed there is quite a lot out there about radio buttons and Knockout, but unfortunately none of these could help me.