jQuery is a multi-browser JavaScript library designed to simplify the client-side scripting of HTML. It is free open source software and easy to use. jQuery’s syntax is designed to make it easier to navigate a document, select DOM elements, handle events, and develop Ajax applications. jQuery also provides capabilities for developers to create plug-ins on top of the JavaScript library.

The first step to start using jQuery is to download it and add it to the static resource. You can download the latest version from  the official page – www.jquery.com. You can find whole documentation and forum for support on this page. If you do not know how to add the static resource, go to Your name->Setup->Develop->Static Resources->New.

Open your Visualforce page, where you want to use jQuery. Add Apex includeScript tag to include jQuery into your page (the best practise after <apex:page>)

Note: this works when you upload jQuery as .js file, not in the archive (.zip). If using archive, follow this line

In Visualforce page we write javascript between tags <script>..<script>, so add this line between these tags before you start developing some Javascript in jQuery.

This is very important, because Salesforce uses jQuery and other Javascript libraries too. These libraries can have different versions, so a conflict can occur, regarding correct function call.

Standard char $ is alias for library in many libraries, so you must define own alias using line which is mentioned above.

Now you can use jQuery in your Visualforce pages as you want. But do not forget to use your new alias $j for calling jQuery, because in almost all examples on internet/ in books you can only find using $.

Here is the example to show user popup box with welcome text after page is loaded:

If you are not excellent javascript developer you can download many jQuery plugins which add lots of new user interface experience for you (you can use it when you are lazy too, or you support idea: why should I discover a wheel again, when it already exists).

You can find these plugins on internet simply via search engines, or on jQuery page – http://plugins.jquery.com/.

Very interesting is plugin jQuery UI – http://jqueryui.com/ from developers of jQuery. It is a curated set of user interface interactions, effects, widgets, and themes. With jQuery UI you can quickly build tabbed page, dialogs (popups), sliders, sortable items and many more.