jQuery is a lightweight JavaScript library designed to simplify JavaScript on your webpage.
jQuery technology works based on “write less, do more”. You need to write many line for accomplish specific task in JavaScript, where jQuery make this very sort code to accomplish same task which you accomplish by using JavaScript.
jQuery simplifies the complex things from JavaScript, like AJAX functions and DOM manipulation.
The jQuery library have the following important features:
HTML or DOM manipulation, CSS manipulation, HTML event methods, Effects and animations, AJAX, Utilities etc.
Many of the top famous companies on the use jQuery for web, such as: Google, Microsoft, IBM.
Example:
<!DOCTYPE html>
<html>
<head>
<title>jQuery Example</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js">
</script>
<script type="text/javascript">
$(document).ready(function() {
$("h1").css("color", "blue");
});
</script>
</head>
<body>
<h1>jQuery Example</h1>
<p>This is Paragraph.</p>
</body>
</html>
Output:
jQuery Example
This is Paragraph.
Description
You need to include ” jquery.min.js” jQuery javascript file for accomplish jquery functionality.
Normally JQuery element start with symbol “$” (dollar).
syntax: $(“h1”).css(“color”, “blue”)
Above code in syntax tell browser to change css of “color” to “blue” of “h1” element.
Must write jQuery code between <script> code as JavaScript.
To know detail about other tags of HTML document refer here.