on 21 September 18
Causes of JS Conflicts
Detecting the Conflict
In case, your JS runs an error, then with the help of the error message that is displayed, you can easily focus on the extension or feature on the website that is the main cause for the problem. You will also see the name of the file that is majorly responsible for the conflict to get started.
- To know the extension that is responsible for this conflict, here are a few steps that you can follow
- Switch back to default Joomla, disable the installed extensions, reload the site and check for the JS conflicts and errors
Publish back the disabled extensions one by one, and reload the website after each installation is enabled
Resolving the Conflict
Once you have pinpointed the problem, it is time to focus on the solution. Let's try and find a way to resolve the conflict, that might be affecting your website.
JQuery in No-Conflict Mode
This is the ideal step that you should take to resolve conflicts. The entire jQuery library and the related plug-ins are stored in the jQuery namespace. Even the global objects are stored in the jQuery namespace. You should avoid the conflicts that might occur between jQuery namespace and Mootools or other such libraries. To avoid conflict, put the jQuery namespace to no-conflict mode as soon as the page is loaded, and before getting started with the jQuery on that particular page
In case, you are unable to resolve the conflict by putting the jQuery in no-conflict mode, you should try to seek help from the developer of the extension.