Categories: jQuery

jQuery What is it?

Who hasn’t gotten this question yet: jQuery What is it?

Source: http://www.w3schools.com/jquery/jquery_intro.asp

Definition:
jQuery is a lightweight, “write less, do more”, JavaScript library.
jQuery is a cross-platform JavaScript library designed to simplify the client-side scripting of HTML.

Purpose
The purpose of jQuery is to make it much easier to use JavaScript on your website.
jQuery’s syntax is designed to make it easier to navigate a document, select DOM elements, create animations, handle events, and develop Ajax applications
jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation.

What is in it
The jQuery library contains the following features:

  • HTML/DOM manipulation
  • CSS manipulation
  • HTML event methods
  • Effects and animations
  • AJAX
  • Utilities

Advantages:
The modular approach to the jQuery library allows the creation of powerful dynamic web pages and web applications.
jQuery has plugins for almost any task out there.

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()

  • 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.

$(“p”).hide() – hides all

elements.

$(“.test”).hide() – hides all elements with class=”test”.

$(“#test”).hide() – hides the element with id=”test”.

Example of html page including jQuery code:

Test it below:




If you click on me, I will disappear.

Click me away!

Click me too!




More on jQuery:
[jQuery Guide and Resources]

Etienne Noumen

Sports Lover, Linux guru, Engineer, Entrepreneur & Family Man.

Share
Published by
Etienne Noumen

Recent Posts

The Importance of Giving Constructive Feedback

Offering employees, coworkers, teammates, and students constructive feedback is a vital part of growth on…

1 day ago

Why Millennials Need To Invest for Retirement Now

Millennials should avoid delaying the inevitable and look into various retirement investment pathways. Here’s why…

1 day ago

A Daily Chronicle of AI Innovations in May 2024

AI Innovations in May 2024

4 days ago

Tips for Ensuring Success Throughout Your Career

For most people, a satisfactory career is essential for leading a happy life. However, ensuring…

1 week ago

Different Career Paths in the Pipeline Industry

The pipeline industry is more than pipework and construction, and we explore those details in…

1 week ago

SQL Interview Questions and Answers

SQL Interview Questions and Answers In the world of data-driven decision-making, SQL (Structured Query Language)…

2 weeks ago