Conflict $ between scripts

1

I'm trying to use these two scripts:

link link

But I use jQuery and Prorotype on the same page, and to avoid conflict between them I put this code $JQUERY = jQuery.noConflict();

It works fine, but I can not adapt these two scripts so they use $JQUERY instead of $ .

How can I change them?

    
asked by anonymous 01.05.2016 / 17:20

1 answer

1

These scripts are designed to run in non-conflict mode. You only need to run jQuery.noConflict(); .

To make sure everything works fine you can put it together in this order:

document.body.innerHTML = [
  'Prototype.Version: ' + Prototype.Version,
  '<br/>',
  'jQuery.version: ' + jQuery.fn.jquery
].join('');
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><script>jQuery.noConflict();</script><scriptsrc="http://suprb.com/apps/gridalicious/js/jquery.grid-a-licious.js"></script>
<script src="http://suprb.com/apps/gridalicious/js/jquery.fittext.js"></script><scriptsrc="https://ajax.googleapis.com/ajax/libs/prototype/1.7.3.0/prototype.js"></script>
    
01.05.2016 / 19:51