home / software / tips and tricks / Chapter 4 - JQuery Syntax

Chapter 4 - JQuery Syntax

Updated:  06/15/2013 01:06 AM
Author:  Shiju Mathews

Status:    Resolved.


Chapter 4 - JQuery Syntax
<<   Previous ChapterChaper 4Next Chapter >>
 

The jQuery syntax is tailor dollar sign and parentheses for selecting HTML elements and performing action on the element(s).

Basic syntax is: $(selector).action()    A $ sign to define/access jQuery
   A (selector) to "query (or find)" HTML elements
   A jQuery action() to be performed on the element(s)

Examples:
$(this).hide() - hides the current element.

$("span").hide() - hides all elements.

$(".info").hide() - hides all elements with class="info".

$("#info").hide() - hides the element with id="info".


<<   Previous ChapterChaper 4Next Chapter >>
 

Tags: Chapter 4 - JQuery Syntax
Updated on: April 2024