Once you start to find your feet with website management you’ll come across loads of jquery plugins that can make your site look much more interactive.
Plugging them into a WordPress or Drupal site is pretty simple once you know how to do it, but it can be a very frustrating experience if you don’t. Here’s where a lot of the common problems lie.
1. jQuery is already installed in WordPress and Drupal by default.
On many example sites that demonstrate the jQuery plugins you’ll see that a
(Uncaught TypeError: Property '$' of object [object Object] is not a function)
This is usually caused by problem 2 above. You’re using a jQuery function but WordPress doesn’t properly recognise it as a jQuery one. Wrap the function in the jQuery wrapper outlined there, and look at the Page source code to check that your custom jQuery scripts are being loaded after the jQuery one is. Note that Drupal and WordPress will often combine and compress js files so you may need to click on each one to see which one has the main jQuery code in it.
Still stuck? Try isolating the problem by using a code playground like jsfiddle.net It’s really quick to set up an account there and it’s a great way of testing and tweaking sections of your code. If you get stuck then you can post your problem and a link to your jsfiddle on stackoverflow. You’ll be amazed how often you’ll get a reply and a fixed version of code within a day.