Give help. Get help.

  • # June 20, 2008 at 9:58 pm

    Hi all,
    I’ve been building a site with wordpress and came across a bit of a problem trying to insert a jquery script to the header.
    Apparently it doesn’t like the $ and won’t recognise any function with the $ before it! I was adding this between some script tags.

    < ------ stuff here -----/>

    No luck! After a lot of head scratching i found an article that recommended this instead.

    jQuery(document).ready(function($) {
    < ------ stuff here -----/>

    Works like a charm. You can now use the $ inside the document.ready function. It’s to do with other javascript librarys used in WordPress so they don’t conflict. I’d never heard of this so i hope it’s useful to someone else!

    Tob :D

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.