Wednesday, March 25, 2009

Adding and using jQuery on Blogger / Blogspot

Investigating my visitors statistics, I noticed that there were some users who were interested in adding and using jQuery on their Blogger.com (Blogspot.com) accounts. Adding jQuery library to your Blogger/Blogspot blog is not difficult. All you have to do is to add one line of code to your template’s header.

Here is the code to add to your blogger template’s header:

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

NOTE:
You don’t even need to upload jquery.js file on any other hosting Google will host it for your.

Instruction for adding jQuery to Blogger:

  1. Login to your dashboard;
  2. Choose your blog;
  3. From the top menu select “Layout”;
  4. Then select “Edit HTML” sub-menu;
  5. Add the above code just below <head> tag (or alternatively, just above </head> tag)

13 comments:

  1. If you can suggest some practical usage of jQuery in Blogger will be great post.
    Thanks.

    ReplyDelete
  2. @Shinichi Okada Thanks, good idea for my future post...

    ReplyDelete
  3. hey, I need HELP!
    please add me to your contacts on msn.
    PLEASE!

    mariano.143@hotmail.com

    ReplyDelete
  4. Hrm I think it doesn't work anymore.

    ReplyDelete
  5. @taquito, I don't use MSN messenger, you better ask me your jQuery related questions on my Twitter account: @jqueryHowto. Would be glad to help...

    @Chris From Detroit, just checked, works just fine... Or are you having some specific problem?

    ReplyDelete
  6. Don't work... :S I have this error:

    Unsafe JavaScript attempt to access frame with URL.....

    ReplyDelete
  7. i want to use two jquery functions one is working other is not i thing the problem is include first file ..what should i do>

    ReplyDelete
  8. I neeeeeeeeeeeeed help please .................
    I downloaded moving boxes .js file. I want to use that plugin in my blogspot.com how to doooooooooooooooooooooo that ??

    ReplyDelete
  9. And now as the Blogger's interface has changed it should be a little different, maybe pasting this code in the widget section.

    ReplyDelete
  10. Hey! I added this to my blogspot with infinite scroll, but my default image preview is broken now. Can anyone help me fix this?

    Everything that would normal be on the pages after the first one no longer work. Its odd. This isn't my area of specialty, but I would really like to get this feature to work! Thanks. Am.CGHug @ Gmail . Com <3

    ReplyDelete
  11. Hey Allan. I update the link in the post, please try to change it on your blog. If the problem persists, please ask me on http://www.facebook.com/jQueryHowto page.

    ReplyDelete