Scroll to top

Jquery tutorial for beginners with examples

Now I have started learning JQuery so I wanted to have my own concise tutorial article for JQuery. I hope this will be helpful to other beginners too.

Note*: There are other tutorial on web which is quite good, basically JQuery’s own tutorial. If you are looking for more details you can also look for the API document of JQuery.

What is JQuery and What is not

JQuery is open source lightweight Javascript Library which is used to simplify interaction between HTML and JavaScript. 

JQuery is not a language. JavaScript is Language. JQuery is built over JavaScript.

What JQuery can do

  • DOM Manipulation
  • CSS Manipulation
  • AJAX
  • Effects and Animation

How to use JQuery

You can start using JQuery by adding the JQuery library in HTML file.

<!doctype html>
<meta charset="utf-8" />
<a href="">JBT</a>



Imp Point in above code

  • Here we are using JQuery.min.js instead of JQuery.js. In Production you should use minified version of library. It will load fast as it doesn’t contain unnecessary comment and whitespaces.
  • JQuery is getting loaded from Google CDN instead of self hosting. It will again make your site load faster. Also it will help you website take advantage of cache.

JQuery Syntax

Now we know how to use JQuery in web page. Next step would be using JQuery syntax. Common syntax for JQuery would be


Example of JQuery Syntax

I want to show an alert message when ever document is ready or loaded completely.

Where(Selectors) : On Document.

When (Action): Document is in ready state or loaded completely.

What(Function) : Show an alert message.

Syntax in JQuery for above requirement


Different options for Selector(Where)

All Element – *

Current HTML element – this

Class –   .<Class_Name>   (look for dot)

Id – #<Id_Name> (look for #)

HTML element 

  • a (hyperlink)
  • table
  • tr
  • td
  • p
  • …….


Complete HTML Code

<!doctype html>
<meta charset="utf-8" />



Author avatar


  1. Tharun

    Understandable in a good way.

  2. Tharun

    Nice site to learn

  3. Raviteja

    Very Good Explanation..! My Clouds are clear with the basic steps. Thanks

  4. venu

    Very Nice And clear explantion…….. 5stars

  5. laxmi

    can u post more detail about jquery

  6. sujitha

    Nice explanation..

  7. Florian

    Hi there, nice tutorial.


  8. Bala

    Nice way to begin my jquery concept ,thanks for the very clear explanation

Post a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.