JQuery Knowledge Check
JQuery Knowledge Check
Introduction to jQuery
jQuery is a lightweight, fast, small, and feature-rich JavaScript library. It makes it much easier to write
JavaScript code for websites. We don't have to scratch our heads much for animations, DOM manipulation,
or HTML events.
JavaScript vs jQuery
JavaScript is a client-side language (it runs in the browser), whereas jQuery is a library built on top of
Features of jQuery
2. CSS Manipulation
4. AJAX Support
5. Utility Functions
6. Event Handling
You can use jQuery either by downloading it from the official website or linking it via CDN (Content Delivery
Network).
Example (CDN):
<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
HTML:
jQuery:
$(document).ready(function() {
$('#btn').click(function() {
alert('Hello World');
});
});
Explanation:
jQuery Selectors
- $('#id') selects by ID