SlideShare a Scribd company logo
By- Tajendar Arora
What is jQuery?
•jQuery is an Open-Source JavaScript framework that
simplifies cross-browser client side scripting.
•Animations
•DOM manipulation
•AJAX
•Extensibility through plugins
•jQuery was created by John Resig and released 01/06
•Most current release is 1.4.2 (2/19/10)
By- Tajendar Arora
Javascript is not a good language design
Javascript has become bloated
DOM navigation
Browser differences
Writing Javascript code is tedious, time-consuming, and
error-prone
By- Tajendar Arora
Who Uses jQuery?
Google Amazon IBM
Microsoft Twitter Dell
docs.jquery.com/Sites_Using_jQuery
By- Tajendar Arora
jQuery exists as a single external JS file. You can run jQuery one of two
ways:
Download the file to your computer
Link to a remotely hosted version from a reliable and established website
Each option has its pros and cons
Download: The main benefit is that if you are offline, the file will still be there
on your computer when you are developing your code.
Link:These externally linked files are typically the most up to date.
<script src=
"http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"><
/script>
Remember that this link must go in the ‘head’ section of your HTML file.
Note that the closing </script> tag IS required.
By- Tajendar Arora
jQuery is a framework built using JavaScript capabilities. So, you can use
all the functions and other capabilities available in JavaScript
String
Numbers
Boolean
Objects
JavaScript supports Object concept very well.You can create an object
using the object literal as follows:
var emp = { name: "Zara", age: 10 };
// Getting object properties
emp.name // ==> Zara
// Setting object properties
emp.name = "Daisy" // <== Daisy
By- Tajendar Arora
Arrays
You can define arrays using the array literal as follows:
var x = [];
var y = [1, 2, 3, 4, 5];
An array has a length property that is useful for iteration:
var x = [1, 2, 3, 4, 5];
for (var i = 0; i < x.length; i++)
{
do something;
}
By- Tajendar Arora
Functions
A function in JavaScript can be either named or anonymous. A named
function can be defined using function keyword as follows:
function named(){
// do some stuff here
}
An anonymous function can be defined in similar way as a normal
function but it would not have any name. An anonymous function can be
assigned to a variable or passed to a method as shown below.
var handler = function (){
// do some stuff here
}
JQuery makes a use of anonymous functions very frequently as follows:
$(document).ready(function(){ ……………….}
By- Tajendar Arora
Context
JavaScript famous keyword this always refers to the current
context.
Example
$("div").click(function() {
// this refers to a div DOM element
});
By- Tajendar Arora
Scope
The scope of a variable is the region of your program in which it is
defined. JavaScript variable will have only two scopes.
Global Variables: A global variable has global scope which means it is
defined everywhere in your JavaScript code.
Local Variables: A local variable will be visible only within a function
where it is defined. Function parameters are always local to that
function.
By- Tajendar Arora
Callback
A callback is a plain JavaScript function passed to some method as an
argument or option. Some callbacks are just events, called to give the
user a chance to react when a certain state is triggered. jQuery's event
system uses such callbacks everywhere for example:
$("body").click(function(event) {
console.log("clicked: " + event. target);
});
By- Tajendar Arora
Callback
A callback is a plain JavaScript function passed to some method as an
argument or option. Some callbacks are just events, called to give the
user a chance to react when a certain state is triggered. jQuery's event
system uses such callbacks everywhere for example:
$("body").click(function(event) {
console.log("clicked: " + event. target);
});
By- Tajendar Arora
Okay, let’s get started with our first jQuery function!
We will begin with a function called ‘ready()’, or more specifically,
document.ready()
•The ‘ready’ function executes after the entire web page has finished loading in the
visitor’s browser. You will typically include this function on every page in which you are
using jQuery.
<script>
$(document).ready(
function()
{
// Some jQuery code will
// go in here...
}
);
</script>
By- Tajendar Arora
By- Tajendar Arora

More Related Content

ODP
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
PDF
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
PDF
Codegeneration With Xtend
PDF
jQuery - Chapter 4 - DOM Handling
PDF
jQuery - Chapter 5 - Ajax
PPTX
Lecture 5 javascript
PDF
Advanced realm in swift
PPTX
Javascript functions
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
JavaScript Tutorial For Beginners | JavaScript Training | JavaScript Programm...
Codegeneration With Xtend
jQuery - Chapter 4 - DOM Handling
jQuery - Chapter 5 - Ajax
Lecture 5 javascript
Advanced realm in swift
Javascript functions

What's hot (20)

PDF
Difference between java script and jquery
PDF
Realm of the Mobile Database: an introduction to Realm
PDF
Recipes to build Code Generators for Non-Xtext Models with Xtend
PDF
Activator and Reactive at Play NYC meetup
PDF
jQuery - Chapter 1 - Introduction
PDF
The dark side of Akka and the remedy
PDF
Intro to React
PPTX
J Query The Write Less Do More Javascript Library
PPTX
Advanced Javascript
PDF
Actor Model Akka Framework
PDF
Object Oriented PHP - PART-1
PPTX
Introduction to JavaScript Programming
PPTX
Java script
PPT
JavaScript Basics
PDF
Basic JavaScript Tutorial
PDF
Who killed object oriented design?
PPT
"Scala in Goozy", Alexey Zlobin
PDF
Building DSLs With Eclipse
PPT
Java Script ppt
Difference between java script and jquery
Realm of the Mobile Database: an introduction to Realm
Recipes to build Code Generators for Non-Xtext Models with Xtend
Activator and Reactive at Play NYC meetup
jQuery - Chapter 1 - Introduction
The dark side of Akka and the remedy
Intro to React
J Query The Write Less Do More Javascript Library
Advanced Javascript
Actor Model Akka Framework
Object Oriented PHP - PART-1
Introduction to JavaScript Programming
Java script
JavaScript Basics
Basic JavaScript Tutorial
Who killed object oriented design?
"Scala in Goozy", Alexey Zlobin
Building DSLs With Eclipse
Java Script ppt
Ad

Viewers also liked (20)

PDF
Introduction to java
PDF
SILVER NANOPARTICLE IMPREGNATED BIOMEDICAL FIBER
PDF
PREPARATION OF MANGANESE NANOPARTICLES AND VALUABLE SALTS FROM SPENT DRY BATT...
PPTX
Yurts Residential
PPTX
Providing incentives
PPTX
Promoting U.S. Exports and Commercial Involvement
PDF
hospitality
PPT
Challenges confronting the police institution in ghana by evans kojo acheampong
PPTX
Finding Your Future in Aviation and the Aerospace Industry
PPTX
Unit 11 – task 3
PDF
Newnewpaper
PDF
Sheadrick frank 4.4
PPTX
Digital marketing-training-institute
PDF
Formação Continuada
PDF
director de televisión publica
PPTX
Einführung in die @4sqapi
PPTX
Unit 27 task 3 - part 3 - weeks 1 to 4
PPTX
Improvement targets
PPTX
Major Supply Chain Trends for 2014
PDF
Is your flow meter accurate?
Introduction to java
SILVER NANOPARTICLE IMPREGNATED BIOMEDICAL FIBER
PREPARATION OF MANGANESE NANOPARTICLES AND VALUABLE SALTS FROM SPENT DRY BATT...
Yurts Residential
Providing incentives
Promoting U.S. Exports and Commercial Involvement
hospitality
Challenges confronting the police institution in ghana by evans kojo acheampong
Finding Your Future in Aviation and the Aerospace Industry
Unit 11 – task 3
Newnewpaper
Sheadrick frank 4.4
Digital marketing-training-institute
Formação Continuada
director de televisión publica
Einführung in die @4sqapi
Unit 27 task 3 - part 3 - weeks 1 to 4
Improvement targets
Major Supply Chain Trends for 2014
Is your flow meter accurate?
Ad

Similar to Introduction to Jquery (20)

PDF
AJS UNIT-1 2021-converted.pdf
PPTX
J query resh
PPTX
Jqueryppt (1)
PDF
JavaScript
PPT
J Query
PPTX
Jquery beltranhomewrok
PPTX
Jquery beltranhomewrok
PPTX
Introduction to JavaScript
PDF
Behind the curtain - How Django handles a request
PDF
Top 45 jQuery Interview Questions and Answers | Edureka
PDF
Intro to JavaScript
PPTX
Java script performance tips
PDF
[2015/2016] JavaScript
PPTX
Java script
PDF
WebNet Conference 2012 - Designing complex applications using html5 and knock...
PPT
Jquery PPT_Finalfgfgdfgdr5tryeujkhdwappt
PPTX
An introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSON
PPTX
JS basics
KEY
JavaScript Growing Up
AJS UNIT-1 2021-converted.pdf
J query resh
Jqueryppt (1)
JavaScript
J Query
Jquery beltranhomewrok
Jquery beltranhomewrok
Introduction to JavaScript
Behind the curtain - How Django handles a request
Top 45 jQuery Interview Questions and Answers | Edureka
Intro to JavaScript
Java script performance tips
[2015/2016] JavaScript
Java script
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Jquery PPT_Finalfgfgdfgdr5tryeujkhdwappt
An introduction to DOM , JAVASCRIPT , JQUERY, AJAX and JSON
JS basics
JavaScript Growing Up

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Big Data Technologies - Introduction.pptx
PPT
Teaching material agriculture food technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPTX
sap open course for s4hana steps from ECC to s4
PDF
cuic standard and advanced reporting.pdf
Cloud computing and distributed systems.
Chapter 3 Spatial Domain Image Processing.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
The Rise and Fall of 3GPP – Time for a Sabbatical?
Mobile App Security Testing_ A Comprehensive Guide.pdf
Big Data Technologies - Introduction.pptx
Teaching material agriculture food technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Dropbox Q2 2025 Financial Results & Investor Presentation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
20250228 LYD VKU AI Blended-Learning.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
sap open course for s4hana steps from ECC to s4
cuic standard and advanced reporting.pdf

Introduction to Jquery

  • 2. What is jQuery? •jQuery is an Open-Source JavaScript framework that simplifies cross-browser client side scripting. •Animations •DOM manipulation •AJAX •Extensibility through plugins •jQuery was created by John Resig and released 01/06 •Most current release is 1.4.2 (2/19/10) By- Tajendar Arora
  • 3. Javascript is not a good language design Javascript has become bloated DOM navigation Browser differences Writing Javascript code is tedious, time-consuming, and error-prone By- Tajendar Arora
  • 4. Who Uses jQuery? Google Amazon IBM Microsoft Twitter Dell docs.jquery.com/Sites_Using_jQuery By- Tajendar Arora
  • 5. jQuery exists as a single external JS file. You can run jQuery one of two ways: Download the file to your computer Link to a remotely hosted version from a reliable and established website Each option has its pros and cons Download: The main benefit is that if you are offline, the file will still be there on your computer when you are developing your code. Link:These externally linked files are typically the most up to date. <script src= "http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">< /script> Remember that this link must go in the ‘head’ section of your HTML file. Note that the closing </script> tag IS required. By- Tajendar Arora
  • 6. jQuery is a framework built using JavaScript capabilities. So, you can use all the functions and other capabilities available in JavaScript String Numbers Boolean Objects JavaScript supports Object concept very well.You can create an object using the object literal as follows: var emp = { name: "Zara", age: 10 }; // Getting object properties emp.name // ==> Zara // Setting object properties emp.name = "Daisy" // <== Daisy By- Tajendar Arora
  • 7. Arrays You can define arrays using the array literal as follows: var x = []; var y = [1, 2, 3, 4, 5]; An array has a length property that is useful for iteration: var x = [1, 2, 3, 4, 5]; for (var i = 0; i < x.length; i++) { do something; } By- Tajendar Arora
  • 8. Functions A function in JavaScript can be either named or anonymous. A named function can be defined using function keyword as follows: function named(){ // do some stuff here } An anonymous function can be defined in similar way as a normal function but it would not have any name. An anonymous function can be assigned to a variable or passed to a method as shown below. var handler = function (){ // do some stuff here } JQuery makes a use of anonymous functions very frequently as follows: $(document).ready(function(){ ……………….} By- Tajendar Arora
  • 9. Context JavaScript famous keyword this always refers to the current context. Example $("div").click(function() { // this refers to a div DOM element }); By- Tajendar Arora
  • 10. Scope The scope of a variable is the region of your program in which it is defined. JavaScript variable will have only two scopes. Global Variables: A global variable has global scope which means it is defined everywhere in your JavaScript code. Local Variables: A local variable will be visible only within a function where it is defined. Function parameters are always local to that function. By- Tajendar Arora
  • 11. Callback A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered. jQuery's event system uses such callbacks everywhere for example: $("body").click(function(event) { console.log("clicked: " + event. target); }); By- Tajendar Arora
  • 12. Callback A callback is a plain JavaScript function passed to some method as an argument or option. Some callbacks are just events, called to give the user a chance to react when a certain state is triggered. jQuery's event system uses such callbacks everywhere for example: $("body").click(function(event) { console.log("clicked: " + event. target); }); By- Tajendar Arora
  • 13. Okay, let’s get started with our first jQuery function! We will begin with a function called ‘ready()’, or more specifically, document.ready() •The ‘ready’ function executes after the entire web page has finished loading in the visitor’s browser. You will typically include this function on every page in which you are using jQuery. <script> $(document).ready( function() { // Some jQuery code will // go in here... } ); </script> By- Tajendar Arora