Don't Forget the Namespace

jQuery

I spent several hours yesterday struggling to figure out why jQuery wasn't working correctly on a site I'm working on.

On sites that already have a lot of javascript there are usually a few issues with jQuery, but I was stumped on this one.

Finally a Google search revealed that the $ (dollar sign) namespace was already being used by another set of functions.

A quick find and replace of $ -> jQuery in my jquery document and everything started working smoothly.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options