To resolve this conflict you just need to follow these steps:
When you include the JS in the libraries of the platform, you will see how the conflicting libraries start doing problems. The conflicting libraries in this case (prototype.js) above the jquery.js is a common conflict on coding:
As you see, the conflict comes when the JS code of prototype is over the jquery one. What you need to do is to fix this without even caring about the CSS.
After that, your problem may already be fixed. There’s nothing much else to do about it. But in order to avoid any other type of problem, you can secure your code by adding a “$” on the code, avoiding the jQuery platform to eventually get a problem.
You will be doing this:
jQuery("#id").somefunction(); here you add the $("#id").somefunction();
At this point, you will be replacing the $ with jQuery, making your code work better and efficiently without problems. But if you have other libraries also working on the same code, you could experience other problems. So, when you have other libraries, it is better to add the $ instead of the library (instead of prototype.js, add $).
Even though you should already have your problem fixed, you may also want to do something else to fix the problem. This will help you avoid further conflicts and so on. You just need to write the $ alongside a j “$j”, this will help you find a solution for almost all problem within the code. For example:
Fixing one of these conflicts is not a hard task. However, you may need some guidance. That’s why we always recommend contacting us in case you need any more help or just someone else to do it for you.
Need Some Help with Your Code?