Thursday, 24 November 2016

JQuery - Introduction

jQuery is a small, light-weight and fast JavaScript library. It is cross-platform and supports different types of browsers. It is very useful for data manipulation.
  • jQuery is a small, fast and lightweight JavaScript library.
  • jQuery is platform-independent.
  • jQuery means "write less do more".
  • jQuery simplifies AJAX call and DOM manipulation.
jQuery features:
  • HTML manipulation
  • DOM manipulation
  • DOM element selection
  • CSS manipulation
  • Effects and Animations
  • Utilities
  • AJAX
  • HTML event methods
  • JSON Parsing
  • Extensibility through plug-in
To starts with,
  • A $ sign to define/access jQuery
  • A (selector) to "query (or find)" HTML elements
  • A jQuery action() to be performed on the element(s)

jQuery Syntax:

The jQuery syntax is tailor-made for selecting HTML elements and performing some action on the element(s).

Basic syntax is: $(selector).action()

Examples:
$(this).hide() - hides the current element.
$("p").hide() - hides all elements.
$(".test").hide() - hides all elements with class="test".
$("#test").hide() - hides the element with id="test".


No comments :

Post a Comment