WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had two instances of jquery in my code and everything used to work. I decided to get rid of wordpress stock jquery by deregistering it through functions.php file. But now not a single jquery animation/script I've works!

I've jquery hardcoded in my header though:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>

You can check my problem here: http://dev.holiday.ge/

what is going on? please help me :)

share|improve this question
What happens if you use the WordPress jQuery – as you should? – toscho Oct 2 '12 at 12:02
+1 just use the WordPress jQuery – Chris_O Oct 2 '12 at 14:29
@toscho same thing happens, only when I've both wordpress jquery and my own scripts work. if I use only mine or only wordpress one scripts stop working! – Sandro Dzneladze Oct 2 '12 at 15:33
@Chris_O read my comment above. – Sandro Dzneladze Oct 2 '12 at 15:34
up vote 2 down vote accepted

Include jQuery the correct way with Function Reference/wp enqueue script « WordPress Codex; that method includes jQuery in "no conflict" mode with toher libraries and other javascript http://docs.jquery.com/Using_jQuery_with_Other_Libraries , and if you use Dev tools or Firebug, you will find two JS errors

TypeError: 'undefined' is not a function (evaluating '$(".prefooterslides")') settings.js:7 TypeError: 'undefined' is not a function (evaluating '$('.ac_results ul')') settings.js:85

which are a result of jQuery variable conflicts.

share|improve this answer

If you're stuck on using a Google hosted version of jQuery, there are two plugins that come to mind:

But as @songdogtech eluded to and @toscho mentioned, it's better to just use the core if you're not 100% comfortable with JavaScript debugging (if anything pops up as it did) and do not control the environment completely.

share|improve this answer
He's not stuck with using ajax.googleapis.com; it's his choice. And those plugins include ajax.googleapis.com in no conflict mode, which is the issue here and the cause of the errors. – markratledge Oct 2 '12 at 13:16
Gotcha - thanks for pointing out. – Zach Oct 2 '12 at 13:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.