You are on page 1of 9

jQuery

● Introduction
● Implementation Class: 01

● Syntax
● Selector, Methods
Class: 01
What is jQuery?
Lightweight JavaScript Library

JavaScript

• Long Selector Function()

• Complex Animations Function()

• Lengthy DOM Manipulation Function()

• Lengthy AJAX Coding Function()

Write less, do more


1
Why use jQuery?
• Short Selector

• Variety of Animation Functions

• Easy DOM Manipulation

• Easy CSS Styling

• Easy DOM Traversing

• Simple AJAX Code

2
Benefits of jQuery
• Browser Independent

• Increase Coding Speed

3
Implement jQuery in HTML

ST EP 1: Download jQuery.js file

ST EP 2: Include jQuery.js file in HTML file

ST EP 3: Do jQuery code in <script> tag

4
How to use jQuery?
<html>
<head>
<script src=“jquery.js”></script>
<script>
</script>
</head>
<body>
<h1>Learn jQuery</h1>

<script>
</script>
</body>
</html>

5
Example:
Document.getElementsByClassName(‘classname’)

$(‘.classname’)

Document.getElementById(‘idname’)

$(‘#idname’)

Document.getElementsByTagName(‘tagname’)

$(‘tagname’)

5
Syntax
$(document) .ready (function( ) {

alert(“Hello jQuery”);

});

$(selector) .method( )

5
Rabin Mondal
{Domain Trainer}

Contact- 9614593059
Email- rabin.cadd@gmail.com

You might also like