SlideShare a Scribd company logo
JavaScript Libraries
By: Dumindu Pahalawatta
Introduction to JavaScript libraries (Frameworks)
• Advanced JavaScript programming (especially the complex handling of browser
differences), can often be very difficult and time-consuming to work with.
• To deal with these difficulties, a lot of JavaScript (helper) libraries have been
developed.
• These JavaScript libraries are often called JavaScript frameworks.
• A JavaScript library is a library of pre-written JavaScript which allows for easier
development of JavaScript-based applications, especially for AJAX and
other web-centric technologies.
• All of these frameworks have functions for common JavaScript tasks like
animations, DOM manipulation, and Ajax handling.
List of JavaScript libraries
DOM Oriented GUI Related Web App Related
jQuery Angular UI Angular JS
Dojo Toolkit jQuery UI Backbone.js
midori DHTMLX Cappuccino
MooTools Dojo Widget Echo
Prototype JavaScript
Framework
Ext JS Google Web Toolkit
YUI Library Webix Mootools
jQuery
What is jQuery?
• jQuery is a lightweight, "write less, do more", JavaScript library.
• The purpose of jQuery is to make it much easier to use JavaScript on your
website.
• jQuery takes a lot of common tasks that require many lines of JavaScript code
to accomplish, and wraps them into methods that you can call with a single line
of code.
• jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX
calls and DOM manipulation.
The jQuery library contains the following features:
• HTML/DOM manipulation
• CSS manipulation
• HTML event methods
• Effects and animations
• AJAX
• Utilities
• In addition, jQuery has plugins for almost any task out there.
Why jQuery?
• There are lots of other JavaScript frameworks out there, but jQuery seems to
be the most popular, and also the most extendable.
• Many of the biggest companies on the Web use jQuery, such as:
• Google
• Microsoft
• IBM
• Netflix
Adding jQuery to Your Web Pages
• There are several ways to start using jQuery on your web site.
You can:
• Download the jQuery library from jQuery.com
• Include jQuery from a CDN, like Google
Downloading jQuery
• There are two versions of jQuery available for downloading:
• Production version - this is for your live website because it has been
minified and compressed
• Development version - this is for testing and development
(uncompressed and readable code)
• Both versions can be downloaded from jQuery.com.
jQuery CDN
• If you don't want to download and host jQuery yourself, you can
include it from a CDN (Content Delivery Network).
• Both Google and Microsoft host jQuery.
• To use jQuery from Google or Microsoft, use one of the following:
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)
The Document Ready Event
• This is to prevent any jQuery code from running before the
document is finished loading (is ready).
• It is good practice to wait for the document to be fully loaded and
ready before working with it. This also allows you to have your
JavaScript code before the body of your document, in the head
section.
jQuery Selectors
• jQuery selectors allow you to select and manipulate HTML
element(s).
• jQuery selectors are used to "find" (or select) HTML elements
based on their id, classes, types, attributes, values of attributes
and much more. It's based on the existing CSS Selectors, and in
addition, it has some own custom selectors.
• All selectors in jQuery start with the dollar sign and parentheses:
$().
The element Selector
• The jQuery element selector selects elements based on the
element name.
• You can select all <p> elements on a page like this:
The #id Selector
• The jQuery #id selector uses the id attribute of an HTML tag to
find the specific element.
• An id should be unique within a page, so you should use the #id
selector when you want to find a single, unique element.
The .class Selector
• The jQuery class selector finds elements with a specific class.
• To find elements with a specific class, write a period character,
followed by the name of the class:
Javascript libraries
jQuery Event Methods
• jQuery is tailor-made to respond to events in an HTML page.
• All the different visitor's actions that a web page can respond to are
called events.
• An event represents the precise moment when something happens.
• Examples:
• moving a mouse over an element
• selecting a radio button
• clicking on an element
• The term "fires" is often used with events. Example: "The keypress
event fires the moment you press a key".
Javascript libraries
Commonly Used jQuery Event Methods
click()
• The click() method attaches an event handler function to an HTML
element.
• The function is executed when the user clicks on the HTML
element.
• The following example says: When a click event fires on a <p>
element; hide the current <p> element:
dblclick()
• The dblclick() method attaches an event handler function to an
HTML element.
• The function is executed when the user double-clicks on the
HTML element:
mouseenter()
• The mouseenter() method attaches an event handler function to
an HTML element.
• The function is executed when the mouse pointer enters the
HTML element:
mouseleave()
• The mouseleave() method attaches an event handler function to
an HTML element.
• The function is executed when the mouse pointer leaves the
HTML element:
mousedown()
• The mousedown() method attaches an event handler function to
an HTML element.
• The function is executed, when the left mouse button is pressed
down, while the mouse is over the HTML element:
hover()
• The hover() method takes two functions and is a combination of the
mouseenter() and mouseleave() methods.
• The first function is executed when the mouse enters the HTML element, and
the second function is executed when the mouse leaves the HTML element:
focus()
• The focus() method attaches an event handler function to an HTML form field.
• The function is executed when the form field gets focus:
blur()
• The blur() method attaches an event handler function to an HTML form field.
• The function is executed when the form field loses focus:
jQuery AJAX
jQuery ajax() Method
• The ajax() method is used to perform an AJAX (asynchronous HTTP)
request.
• All jQuery AJAX methods use the ajax() method. This method is mostly used
for requests where the other methods cannot be used.
$.ajax({type: “POST”,
url: "demo_test.txt",
data : {name:”Anne”,city:”Kandy”},
success: function(result){
$("#div1").html(result);
}});

More Related Content

PPTX
Getting started with jQuery
Gill Cleeren
 
PPT
J query presentation
akanksha17
 
PDF
jQuery Introduction
Arwid Bancewicz
 
PDF
fuser interface-development-using-jquery
Kostas Mavridis
 
PDF
jQuery -Chapter 2 - Selectors and Events
WebStackAcademy
 
PPTX
Introduction to jQuery
Alek Davis
 
PPTX
Getting Started with jQuery
Akshay Mathur
 
Getting started with jQuery
Gill Cleeren
 
J query presentation
akanksha17
 
jQuery Introduction
Arwid Bancewicz
 
fuser interface-development-using-jquery
Kostas Mavridis
 
jQuery -Chapter 2 - Selectors and Events
WebStackAcademy
 
Introduction to jQuery
Alek Davis
 
Getting Started with jQuery
Akshay Mathur
 

What's hot (19)

PDF
JavaScript
Ivano Malavolta
 
PPT
Easy javascript
Bui Kiet
 
PDF
Introduction to jQuery
Zeeshan Khan
 
PPTX
SharePoint and jQuery Essentials
Mark Rackley
 
PPTX
SharePoint Cincy 2012 - jQuery essentials
Mark Rackley
 
PPTX
JavaScript!
RTigger
 
PPTX
Jquery fundamentals
Salvatore Fazio
 
PPTX
Javascript for the c# developer
Salvatore Fazio
 
PPTX
Jquery
Zoya Shaikh
 
PPTX
jQuery - Web Engineering
adeel990
 
PPT
jQuery introduction
Tomi Juhola
 
PPTX
Css selector - BNT 11
weekendtesting
 
PPTX
Web Development Introduction to jQuery
Laurence Svekis ✔
 
PDF
D3.js and SVG
Karol Depka Pradzinski
 
PPTX
SharePointfest Denver - A jQuery Primer for SharePoint
Marc D Anderson
 
PPTX
SPTechCon - Share point and jquery essentials
Mark Rackley
 
PPTX
Selenium Locators
Satyam Pandey
 
PPTX
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
David Giard
 
PPTX
ASP.NET MVC and Entity Framework 4
James Johnson
 
JavaScript
Ivano Malavolta
 
Easy javascript
Bui Kiet
 
Introduction to jQuery
Zeeshan Khan
 
SharePoint and jQuery Essentials
Mark Rackley
 
SharePoint Cincy 2012 - jQuery essentials
Mark Rackley
 
JavaScript!
RTigger
 
Jquery fundamentals
Salvatore Fazio
 
Javascript for the c# developer
Salvatore Fazio
 
Jquery
Zoya Shaikh
 
jQuery - Web Engineering
adeel990
 
jQuery introduction
Tomi Juhola
 
Css selector - BNT 11
weekendtesting
 
Web Development Introduction to jQuery
Laurence Svekis ✔
 
D3.js and SVG
Karol Depka Pradzinski
 
SharePointfest Denver - A jQuery Primer for SharePoint
Marc D Anderson
 
SPTechCon - Share point and jquery essentials
Mark Rackley
 
Selenium Locators
Satyam Pandey
 
How I Learned to Stop Worrying and Love jQuery (Jan 2013)
David Giard
 
ASP.NET MVC and Entity Framework 4
James Johnson
 
Ad

Viewers also liked (14)

PDF
JavaScript Libraries: The Big Picture
Simon Willison
 
PDF
Javascript Libraries & Frameworks | Connor Goddard
Connor Goddard
 
PPTX
Java vs javascript (XPages)
Andrew Barickman
 
PDF
JavaOne 2014: Java vs JavaScript
Chris Bailey
 
PDF
Enhancing Responsiveness With Flexbox (CSS Day)
Zoe Gillenwater
 
PDF
Java vs. Java Script for enterprise web applications - Chris Bailey
JAXLondon_Conference
 
PDF
JavaScript for Enterprise Applications
Piyush Katariya
 
PDF
Choosing Javascript Libraries to Adopt for Development
Edward Apostol
 
PDF
10 Building Blocks for Enterprise JavaScript
Geertjan Wielenga
 
PDF
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
PDF
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
FITC
 
PDF
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Danilo Poccia
 
PDF
Scalable JavaScript Application Architecture
Nicholas Zakas
 
PDF
Your JavaScript Library
Dmitry Baranovskiy
 
JavaScript Libraries: The Big Picture
Simon Willison
 
Javascript Libraries & Frameworks | Connor Goddard
Connor Goddard
 
Java vs javascript (XPages)
Andrew Barickman
 
JavaOne 2014: Java vs JavaScript
Chris Bailey
 
Enhancing Responsiveness With Flexbox (CSS Day)
Zoe Gillenwater
 
Java vs. Java Script for enterprise web applications - Chris Bailey
JAXLondon_Conference
 
JavaScript for Enterprise Applications
Piyush Katariya
 
Choosing Javascript Libraries to Adopt for Development
Edward Apostol
 
10 Building Blocks for Enterprise JavaScript
Geertjan Wielenga
 
Tools For jQuery Application Architecture (Extended Slides)
Addy Osmani
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
FITC
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Danilo Poccia
 
Scalable JavaScript Application Architecture
Nicholas Zakas
 
Your JavaScript Library
Dmitry Baranovskiy
 
Ad

Similar to Javascript libraries (20)

PPT
J query presentation
sawarkar17
 
PDF
Web app with j query &amp; javascript (5:4)
Thinkful
 
PPTX
J111111111111111111111111111111111111111query.pptx
dkmishra2407
 
PPTX
Getting Started with jQuery
Laila Buncab
 
PPTX
Web technologies-course 11.pptx
Stefan Oprea
 
PDF
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Sean Burgess
 
PPTX
WEB TECHNOLOGY Unit-4.pptx
karthiksmart21
 
PDF
jQuery - Chapter 1 - Introduction
WebStackAcademy
 
PPTX
Unit-III_JQuery.pptx engineering subject for third year students
MARasheed3
 
PPTX
Introduction to jquery mobile with Phonegap
Rakesh Jha
 
PDF
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Thinkful
 
PPT
J query module1
Srivatsan Krishnamachari
 
PPTX
J query
Ramakrishna kapa
 
PDF
JQuery UI
Gary Yeh
 
PPT
Jquery PPT_Finalfgfgdfgdr5tryeujkhdwappt
shubhangimalas1
 
PPT
Learn javascript easy steps
prince Loffar
 
PPTX
Web technologies-course 09.pptx
Stefan Oprea
 
PPSX
JQuery Comprehensive Overview
Mohamed Loey
 
J query presentation
sawarkar17
 
Web app with j query &amp; javascript (5:4)
Thinkful
 
J111111111111111111111111111111111111111query.pptx
dkmishra2407
 
Getting Started with jQuery
Laila Buncab
 
Web technologies-course 11.pptx
Stefan Oprea
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Sean Burgess
 
WEB TECHNOLOGY Unit-4.pptx
karthiksmart21
 
jQuery - Chapter 1 - Introduction
WebStackAcademy
 
Unit-III_JQuery.pptx engineering subject for third year students
MARasheed3
 
Introduction to jquery mobile with Phonegap
Rakesh Jha
 
Build a Web App with JavaScript and jQuery (5:18:17, Los Angeles)
Thinkful
 
J query module1
Srivatsan Krishnamachari
 
JQuery UI
Gary Yeh
 
Jquery PPT_Finalfgfgdfgdr5tryeujkhdwappt
shubhangimalas1
 
Learn javascript easy steps
prince Loffar
 
Web technologies-course 09.pptx
Stefan Oprea
 
JQuery Comprehensive Overview
Mohamed Loey
 

Recently uploaded (20)

DOCX
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
PPTX
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
DOCX
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
PPTX
CDH. pptx
AneetaSharma15
 
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PPTX
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
PDF
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PPTX
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
PPTX
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
PPTX
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
PPTX
How to Apply for a Job From Odoo 18 Website
Celine George
 
PDF
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
Modul Ajar Deep Learning Bahasa Inggris Kelas 11 Terbaru 2025
wahyurestu63
 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
BASICS IN COMPUTER APPLICATIONS - UNIT I
suganthim28
 
Unit 5: Speech-language and swallowing disorders
JELLA VISHNU DURGA PRASAD
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
Artificial-Intelligence-in-Drug-Discovery by R D Jawarkar.pptx
Rahul Jawarkar
 
INTESTINALPARASITES OR WORM INFESTATIONS.pptx
PRADEEP ABOTHU
 
CDH. pptx
AneetaSharma15
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PROTIEN ENERGY MALNUTRITION: NURSING MANAGEMENT.pptx
PRADEEP ABOTHU
 
Review of Related Literature & Studies.pdf
Thelma Villaflores
 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
HISTORY COLLECTION FOR PSYCHIATRIC PATIENTS.pptx
PoojaSen20
 
How to Manage Leads in Odoo 18 CRM - Odoo Slides
Celine George
 
An introduction to Prepositions for beginners.pptx
drsiddhantnagine
 
How to Apply for a Job From Odoo 18 Website
Celine George
 
Biological Classification Class 11th NCERT CBSE NEET.pdf
NehaRohtagi1
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
Basics and rules of probability with real-life uses
ravatkaran694
 

Javascript libraries

  • 2. Introduction to JavaScript libraries (Frameworks) • Advanced JavaScript programming (especially the complex handling of browser differences), can often be very difficult and time-consuming to work with. • To deal with these difficulties, a lot of JavaScript (helper) libraries have been developed. • These JavaScript libraries are often called JavaScript frameworks. • A JavaScript library is a library of pre-written JavaScript which allows for easier development of JavaScript-based applications, especially for AJAX and other web-centric technologies. • All of these frameworks have functions for common JavaScript tasks like animations, DOM manipulation, and Ajax handling.
  • 3. List of JavaScript libraries DOM Oriented GUI Related Web App Related jQuery Angular UI Angular JS Dojo Toolkit jQuery UI Backbone.js midori DHTMLX Cappuccino MooTools Dojo Widget Echo Prototype JavaScript Framework Ext JS Google Web Toolkit YUI Library Webix Mootools
  • 5. What is jQuery? • jQuery is a lightweight, "write less, do more", JavaScript library. • The purpose of jQuery is to make it much easier to use JavaScript on your website. • jQuery takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code. • jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM manipulation.
  • 6. The jQuery library contains the following features: • HTML/DOM manipulation • CSS manipulation • HTML event methods • Effects and animations • AJAX • Utilities • In addition, jQuery has plugins for almost any task out there.
  • 7. Why jQuery? • There are lots of other JavaScript frameworks out there, but jQuery seems to be the most popular, and also the most extendable. • Many of the biggest companies on the Web use jQuery, such as: • Google • Microsoft • IBM • Netflix
  • 8. Adding jQuery to Your Web Pages • There are several ways to start using jQuery on your web site. You can: • Download the jQuery library from jQuery.com • Include jQuery from a CDN, like Google
  • 9. Downloading jQuery • There are two versions of jQuery available for downloading: • Production version - this is for your live website because it has been minified and compressed • Development version - this is for testing and development (uncompressed and readable code) • Both versions can be downloaded from jQuery.com.
  • 10. jQuery CDN • If you don't want to download and host jQuery yourself, you can include it from a CDN (Content Delivery Network). • Both Google and Microsoft host jQuery. • To use jQuery from Google or Microsoft, use one of the following:
  • 11. 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)
  • 12. The Document Ready Event • This is to prevent any jQuery code from running before the document is finished loading (is ready). • It is good practice to wait for the document to be fully loaded and ready before working with it. This also allows you to have your JavaScript code before the body of your document, in the head section.
  • 13. jQuery Selectors • jQuery selectors allow you to select and manipulate HTML element(s). • jQuery selectors are used to "find" (or select) HTML elements based on their id, classes, types, attributes, values of attributes and much more. It's based on the existing CSS Selectors, and in addition, it has some own custom selectors. • All selectors in jQuery start with the dollar sign and parentheses: $().
  • 14. The element Selector • The jQuery element selector selects elements based on the element name. • You can select all <p> elements on a page like this:
  • 15. The #id Selector • The jQuery #id selector uses the id attribute of an HTML tag to find the specific element. • An id should be unique within a page, so you should use the #id selector when you want to find a single, unique element.
  • 16. The .class Selector • The jQuery class selector finds elements with a specific class. • To find elements with a specific class, write a period character, followed by the name of the class:
  • 18. jQuery Event Methods • jQuery is tailor-made to respond to events in an HTML page. • All the different visitor's actions that a web page can respond to are called events. • An event represents the precise moment when something happens. • Examples: • moving a mouse over an element • selecting a radio button • clicking on an element • The term "fires" is often used with events. Example: "The keypress event fires the moment you press a key".
  • 20. Commonly Used jQuery Event Methods
  • 21. click() • The click() method attaches an event handler function to an HTML element. • The function is executed when the user clicks on the HTML element. • The following example says: When a click event fires on a <p> element; hide the current <p> element:
  • 22. dblclick() • The dblclick() method attaches an event handler function to an HTML element. • The function is executed when the user double-clicks on the HTML element:
  • 23. mouseenter() • The mouseenter() method attaches an event handler function to an HTML element. • The function is executed when the mouse pointer enters the HTML element:
  • 24. mouseleave() • The mouseleave() method attaches an event handler function to an HTML element. • The function is executed when the mouse pointer leaves the HTML element:
  • 25. mousedown() • The mousedown() method attaches an event handler function to an HTML element. • The function is executed, when the left mouse button is pressed down, while the mouse is over the HTML element:
  • 26. hover() • The hover() method takes two functions and is a combination of the mouseenter() and mouseleave() methods. • The first function is executed when the mouse enters the HTML element, and the second function is executed when the mouse leaves the HTML element:
  • 27. focus() • The focus() method attaches an event handler function to an HTML form field. • The function is executed when the form field gets focus:
  • 28. blur() • The blur() method attaches an event handler function to an HTML form field. • The function is executed when the form field loses focus:
  • 30. jQuery ajax() Method • The ajax() method is used to perform an AJAX (asynchronous HTTP) request. • All jQuery AJAX methods use the ajax() method. This method is mostly used for requests where the other methods cannot be used. $.ajax({type: “POST”, url: "demo_test.txt", data : {name:”Anne”,city:”Kandy”}, success: function(result){ $("#div1").html(result); }});