JQuery Conflict with Lightbox2 WP Plug-in and Content Scroll
There seems to be a conflict between two jquery plug-ins I have on my wordpress site. They seem to be pulling to jquery libraries and cancelling each other out making both plug-ins break.
Lightbox 2 WP Plugin used on this page: http://phiddle2.phiddledesign.com/photography/
Content Slide Plug-in used on the web design page.
Curren开发者_开发知识库tly, I have them both enabled. Any help would be deeply appreciated.
Thanks,
Matt
You can edit one of the plugin files which reference to the jQuery library. Remove or comment it out to see if it works. You might have to get your hands dirty and messy though.
I would suggest you find an alternative. Hacking plugins means you have to hack again if you want to upgrade with a new version when available, unless of course the new version resolve the conflict problem.
It looks like jQuery is actually getting called three times. Once using Google's api, one that the slider plugin packed with it and one likely using wordpress's builtin function wp_enqueue_script. Ideally all would use the latter, that way it would only be loaded once. o.k.w is correct, hacking plugins isn't ideal because you have to go back and edit after every new version. I would email the authors of the offending plugins and let them know their code is causing unnecessary conflicts. Point them here http://codex.wordpress.org/Function_Reference/wp_enqueue_script
精彩评论