• Hi,
    On my blog I have a javascript slider, which I wrote with mootools. It worked when wp_head() was commented out, but now that I want to use the next gen gallery plugin, I need to uncomment it. And so, when I load my page now, many mootools errors come up and the javascript slider doesn’t work, but the flash nextgen gallery does. Does anybody have any idea why wp_head() would have an adverse effect on the javascript?
    Thankyou!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Does anybody have any idea why wp_head() would have an adverse effect on the javascript?

    Because its loading bad javascript. By itself, wp_head() doesn’t do much of anything. What it does do is load code into the <head> section of the document if told to do so. The problem isn’t with wp_head(), its with something that wp_head has been told to load. Exactly what its loading I can’t tell from the information you’ve given. An URL would help though.

    Thread Starter teddyknox

    (@teddyknox)

    Works for me with no errors – FF 3.5 Mac

    Several different javascript files are triggering errors. Disable all of the scripts then start putting them back one by one making sure things work before moving on. It would help a lot if you get Firefox, install Firebug, load the page, and enable Firebug for the page.

    A guess would be that since next gen gallery loads jQuery. With MooTools loaded, it may cause a conflict in the usage of $, even though jQuery is set to no-conflict.

    Try switching the $ sign in your MooTools dependent JavaScript with document.id

    This is to trigger MooTools’ Dollar Safe Mode.
    https://mootools.net/blog/2009/06/22/the-dollar-safe-mode/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘wp_head() causes javascript errors.’ is closed to new replies.