Tip: Adding jQuery Scripts to WordPress

I was just trying to add a simple font-resizer jQuery script to a WordPress theme.

This example seemed really simple but it just won’t work.

After a while, I stumbled on this page in WordPress Codex where it suggested replacing the jQuery shorthand – $ symbol with the word jQuery.

For eg:

$(document).ready(function () {

became

jQuery(document).ready(function () {

So, once I replaced all the ‘$’ symbol to jQuery, it worked flawlessly!

If your jQuery script is not working on your WordPress theme, make sure you check this.

One Response to “Tip: Adding jQuery Scripts to WordPress”

  1. Flv Player July 1, 2011 at 7:12 am #

    Hello,  there! Useful resource………………. this will surely help WP newbies 🙂