jQuery Plugin Tip

Software

I spent the better part of yesterday tracking down a jQuery plugin problem. I was trying to implement the Dialog plugin, which, on paper, looks to be as simple as it can get. However, I kept getting these stupid “$_.widget is not defined errors”, which made no sense. ui.core.js was included.

The upshot is that I was using a single mega-include to add all the plugins I neede for all the pages. I moved to a system whereby each page loads only those plugins it needs. I’m still not sure exactly why, but something about the loading of the 12 or 15 other plugins had stepped on the toes of the jQuery UI plugin.

Shorter: don’t use a single include for all your jQuery plugins. Add them as needed.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Furl
  • Ma.gnolia
  • Reddit
  • TwitThis
No Comments

Leave a Reply

Allowed tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">