Syntax of jQuery:

You can select HTML elements and perform actions on it with the help of jQuery.


You can see that we use three parameters in the jQuery syntax

  • $ : The $ sign defines jQuery
  • selector : defines the HTML element
  • action : defines the action performed over selector



$(this).hide() :- The current element hides

$(“h2”).hide() :- All h2 elements hides

$(“.text”).hide() :- All elements that have class=”text” hides

$(“#text”).hide() :- All elements that have id = “text” hides

One response to “Syntax of jQuery”

  1. skeletal says:

    Appreciating the time and energy you put into your blog and detailed information you present.
    It’s great to come across a blog every once in a while that isn’t the same out of date rehashed information. Great read!
    I’ve saved your site and I’m adding your RSS feeds to my
    Google account.

Leave a Reply

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