Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Better way to include jQuery?
#1
If I need to include jQuery for a plugin or theme, I know how to do that. But if there are two or more plugins or themes that use jQuery, they'll all include their own copies, which would cause a conflict between multiple jQuerys on the final page.

To my knowledge the only way to avoid that is to manually edit out all of the jQuery includes in the themes or plugins that a site is using, except for one.

I suppose I could instead output a bit of javascript that checks if jQuery is available on the page, and of not it would include its own, but that seems like a very messy solution to me. Is there a better way of doing this?

Chris, are there any plans for something similar to Wordpress's wp_enqueue_script function?
Reply
#2
filupn Wrote:Chris, are there any plans for something similar to Wordpress's wp_enqueue_script function?
I would love to implement something like this - but i dont have the time to try and figure it out at this point. I agree with you though - including jQuery is a problem that will only get bigger the longer we leave it as is.
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply




Users browsing this thread: 1 Guest(s)