2009
09.12

What is jQuery?

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. jQuery is designed to change the way that you write JavaScript.

What should I do to install jQuery?

Since WordPress ver. 2.2, jQuery was automatically added into your WordPress installation. And it was released on May 2007, that’s like more than 2 years ago. So there is a high chance that you already have jQuery in your WordPress without you realizing it. 🙂

How to check whether jQuery is loaded by WordPress?

Install Firebug. Firebug is a plugin for Firefox browser. Browse the WordPress blog using Firefox, then enable the firebug by clicking the firebug icon at the bottom-right corner. The icon will change color from gray to something orange-ish. Open the Net tab, then refresh Firefox. You should have something like this:

If you see jquery.js there, it means jQuery is now available for your usage.

You can also check inside your code:

if (jQuery)
{
     //jQuery is loaded, do something
     $j = jQuery.noConflict();
     $j(document).ready(function() {
           // do stuff when DOM is ready
           alert('jQuery wants to say hi!');
     });
}

Of course your code must be put into separate .js file.

Can jQuery conflict with other library?

Yes, it might conflict with Prototype Framework..

Have fun with jQuery! If you like this article, kindly consider to visit the sponsors to check out their offers. Cheers!

GD Star Rating
loading...
How to use jQuery in Your WordPress Post, 5.0 out of 5 based on 1 rating

Incoming Search Term

Advertise Here

No Comment

Add Your Comment