And here is the code throwing the error -
Most of the times the error was just because of the conflict, jQuery uses $ as a shortcut for “jQuery”. You can override that default by calling jQuery.noConflict() at any point after jQuery and the other library have both loaded. For example:
When you use more than one libraries with jQuery which use $ sign for selection of code block, use following script.
// instead of $ use jQuery as
This will remove the conflict between different libraries.
So the final code I ended up using is -
And you dont need to use jQuery.noConflict(); if you are replacing $ with jQuery. That will be done by the script automatically.