• Just a quick note and suggestion here for all of the developers of plugins for WordPress. Since WP includes jQuery in it’s package, I think that plugins that are developed for WP xx should not include it. I’ve had quite a few conflicts arise due to plugins including a jQuery library. Now, I’m not familiar with the development process by any means, nor do I know much of the coding that goes into them, however, after researching for a couple weeks, I found that WP already has jQuery included and that some plugins will call jQuery ‘again’ in it’s own package. This doesn’t really affect the website functionality, however, it does not look too professional when a client visits the site and gets these errors. Like I said, functionality was not affected, but clients will go to another site, click away, and never come back simply because of a simple jQuery conflict. Anyway, my two cents.. Anyone have anymore suggestions?? Please feel free to post and also to suggest possible solutions to any jQuery conflicts you may have encountered. My problems came from the WP-eCommerce plugin along with the Community News plugin both calling jQuery actions. Thanks for reading…
    WP all the way baby!
    P.S. To all you developers out there, you are doing an incredible job and some seriously cool work with these plugins… especially when you offer them for free.. You guys and gals rock! Keep ’em coming!

    Robert
    https://ibprosource.com

Viewing 6 replies - 1 through 6 (of 6 total)
  • There is only one right way to load jQuery which is already included in WordPress: by using wp_enqueue_script function.

    Note that WordPress uses jQuery in noConflict mode so you should be careful when using it in your plugins/themes.

    Thread Starter Robert Ferreira

    (@ibprosource)

    I did read that somewhere not too long ago, however, wp_enqueue_script isn’t working the way it should! I think it may be that the some plugins include a ‘work-around’ for the noConflict code… just a theory and not sure if that’s even possible! lol And you’re right, I believe that loading jQuery through WP is the ONLY right way to do it!! Thanks for your comment.

    wp_enqueue_script isn’t working the way it should

    Could you explain how it doesn’t work the way it should? Maybe some example.

    Thread Starter Robert Ferreira

    (@ibprosource)

    Well, I would paste in the error code that I was getting, however, I’ve since removed the shopping cart plugin from my site. I was using the WP-ecommerce plugin as well as another plugin, Community News, which allowed visitors to write an article directly to the site on a specified page. I was getting an error when both plugins were activated. Is it possible that both plugins were loading jQuery as well as WP? If so, is it also possible, because it was called more than twice, that the wp_enqueue was overlooked after the third jQuery call? Just some theories I’m working up, especially since I don’t understand jQuery or php all that much! Cheers.

    If plugins weren’t couldn’t work at the same time, there could be other problems which made that, I don’t get how you concluded that it is a problem with jQuery.

    Thread Starter Robert Ferreira

    (@ibprosource)

    That was the error code that I received.. I didn’t understand it either, given the fact that WP comes loaded with the noConflict snippet for jQuery. But nevertheless, I did receive a jQuery error conflict due to the aforementioned plugins. Other than the wp_enqueue_script, is there any other way around this type of error? I also understand that the $ before the jQuery call functions in the same manner as the wp_enq…! Is that correct? In any case, I’d hope that plugin developers would think about not including any jQuery library in there products as WP already includes. Please forgive my ignorance if I’m not understanding correctly about jQuery behavior. I’m versed only in HTML, very little CSS and a bit of PHP.. Not much else than that. Thanks again..

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘jQuery Conflict Suggestion to Plugin Developers’ is closed to new replies.