I have developed a wordpress plugin that uses jquery.
This plugin have some javascript functions/operations in custom js file.
As jquery functions, i have used $ sign for selector.
Everything is ok up to now. However, some users use wordpress plugins that uses jquery and that plugin overrided $ sign as jQuery or $j.
If i deregister my jquery.js, my plugin doesnt work, if i deregister other jquery.js other plugin doesnt work. For example, i am using twitter-bootsrap-modal.js in my plugin and it uses $ sign.
When i install another plugin on my wordpress that uses $j system doesn’t work.
Have you any strategies for that kind of situations?
Before using
$jyou should declare it using.noConflict().You can also use it for your plugin, WordPress require it most of the time because it use different libraries.
So at the to of your plugin write:
Then replace all your
$with your new variable used in the no conflict.Hope it help.