SlideShare une entreprise Scribd logo
1  sur  26
Disclaimer: This presentation is prepared by trainees of
baabtra as a part of mentoring program. This is not official
document of baabtra –Mentoring Partner
Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt .
Ltd.
Typing Speed
Week

Target Achieved

1

40

25

2

35

28

3

35

29
Jobs Applied
#

Company

Designation

Applied Date

1

HashInclude
Technologies

Web Designer

09-Aug-2013

2

HashInclude
Technologies

PHP developer

09-Aug-2013

3

Current Status
jQuery
write less, do more

SUHAIL K.P
suhailkp007@gmail.
com
www.facebook.com
/suhilkp007
twitter.com/suhilk
p007
What is jQuery?

• library of JavaScript Functions.
• Takes a lot of common tasks that require many lines of JavaScript
code to accomplish, and wraps them into methods that can call
with a single line of code.
• simplifies 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
Why jQuery?
• There are lots of other JavaScript frameworks like
MooTools, YUI , Dojo etc 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
How to install jQuery ?
• You can download jQuery library from jQuery.com
•

•

If you don't want to store the jQuery library on your own computer, you can use
the hosted jQuery library from Google ,Microsoft or jQuery website.
Google

<script type="text/javascript"
src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js">
</script>

•

Microsoft

<script type="text/javascript"
src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js">
</script>

•

jQuery

<script type="text/javascript"
src=" http://code.jquery.com/jquery-latest.js">
</script>
How to use jQuery library?
include jquery library in your HTML file as follows

<html>
<head>
<title>The jQuery Example</title>
<script type="text/javascript“ src="jquery1.3.2.min.js“ >
</script>
<script type="text/javascript">
// you can add our javascript code here </script>
</head>
<body> ........ </body>
</html>
How to call a jQuery library
functions?
you want an event to work on your page, you should call it
inside the $(document).ready() function. Everything inside it
will load as soon as the DOM is loaded and before the page
contents are loaded.
To do this, we register a ready event for the document as follows:

$(document).ready(function()
{
// do stuff when DOM is ready
});
jQuery Syntax
• The jQuery syntax for selecting HTML elements and perform
some action on the element(s).
• Basic syntax is: $(selector).action()
– A dollar sign to define jQuery(synonym of jQuery())
– A (selector) to "query (or find)" HTML elements
– A jQuery action() to be performed on the element(s)

• Examples:
–
–
–
–

$(this).hide() - hides current element
$("p").hide() - hides all paragraphs
$("p.test").hide() - hides all paragraphs with class="test"
$("#test").hide() - hides the element with id="test"
Selectors
• jQuery selectors allow you to select and manipulate
HTML element(s).
• You can instantiate the jQuery object simply by writing
jQuery() or even shorter using the jQuery shortcut
name: $(). Therefore, selecting a set of elements is as
simple as this:
$(<query >)
• With the jQuery object returned, you can then start
using and altering the element(s) you have matched.
SELECT DOM ELEMENTS

• Selecting DOM elements through
document based on the css selectors.
• The #id selector
$(document).ready(function() {
$(“#d1").text("Test");
});

• This code will be applied on only one
element whose ID attribute is d1.
SELECT DOM ELEMENTS(CONT’D)


The .class selector

$(document).ready(function() {
$(“.para").text("Test");
});


This code will be applied on all elements with the
.para class
SELECT DOM ELEMENTS(CONT’D)


The element selector

$(document).ready(function() {
$(“div").text("Test");
});


This code will be applied on all <div> tags
SOME MORE EXAMPLES
Syntax

Description

$(this)

Current HTML element

$("p")

All <p> elements

$("p.intro")

All <p> elements with class="intro"

$("p#intro")

All <p> elements with id="intro"

$("p.intro:first")

The first <p> element with class="intro"

$(".intro")

All elements with class="intro"

$("#intro")

The first element with id="intro"

$("ul li:first")

The first <li> element of the first <ul>

$("ul li:first-child")

The first <li> element of every <ul>

$("[href$='.jpg']")

All elements with an href attribute that ends with
".jpg"

$("div#intro .head")

All elements with class="head" inside a <div>
element with id="intro"
JQUERY






EVENTS

The jQuery event handling methods are core functions in jQuery.
Event handlers are method that are called when "something happens"
in HTML
$("button").click(function() {..some code... } )
EX:


$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});
JQUERY


EVENTS(CONT’D)

Here are some examples of event methods in jQuery:

Event Method

Description

$(document).ready(function)

Binds a function to the ready event of a
document
(when the document is finished loading)

$(selector).click(function)

Triggers, or binds a function to the click event of
selected elements

$(selector).dblclick(function)

Triggers, or binds a function to the double click
event of selected elements

$(selector).focus(function)

Triggers, or binds a function to the focus event
of selected elements

$(selector).mouseover(function)

Triggers, or binds a function to the mouseover
event of selected elements
jQuery - DOM Traversing

• which provides a variety of DOM traversal methods to help
us to select elements in a document.
• DOM Traversal Methods do not modify the jQuery object
and they are used to filter out elements from a document
based on given conditions.
For Example :

<html>
<head>
<title>the title</title>
</head><body><div>
<ul>
<li>list item 1</li>
<li>list item 2</li>
<li>list item 3</li>
<li>list item 4</li>
<li>list item 5</li>
<li>list item 6</li>
</ul> </div> </body> </html>

Above every list has its own index, and can be located directly by using
eq(index),
Eg: $("li").eq(1)
jQuery - AJAX
•jQuery provides several methods for AJAX functionality.
jQuery load() Method

 The load() method loads data from a server and puts the
returned data into the selected element.
Syntax:

$(selector).load(URL,data,callback);
•The required URL parameter specifies the URL you wish to load.
•The optional data parameter specifies a set of querystring key/value pairs to send
along with the request.
•The optional callback parameter is the name of a function to be executed after the
load() method is completed.
Form Validation Example
example
Thank you..
If this presentation helped you, please visit our
page facebook.com/baabtra and like it.

Thanks in advance.
www.baabtra.com | www.massbaab.com |www.baabte.com
Contact Us
Emarald Mall (Big Bazar Building)
Mavoor Road, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550

Start up Village
Eranakulam,
Kerala, India.
Email: info@baabtra.com

NC Complex, Near Bus Stand
Mukkam, Kozhikode,
Kerala, India.
Ph: + 91 – 495 40 25 550

Contenu connexe

Tendances

javascript objects
javascript objectsjavascript objects
javascript objectsVijay Kalyan
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events WebStackAcademy
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6Rob Eisenberg
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptWalid Ashraf
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript TutorialBui Kiet
 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced JavascriptAdieu
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch Haitham Refaat
 
Asynchronous JavaScript Programming
Asynchronous JavaScript ProgrammingAsynchronous JavaScript Programming
Asynchronous JavaScript ProgrammingHaim Michael
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event HandlingWebStackAcademy
 
JavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM ManipulationJavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM Manipulationborkweb
 
Spring Framework - Spring Security
Spring Framework - Spring SecuritySpring Framework - Spring Security
Spring Framework - Spring SecurityDzmitry Naskou
 
JavaScript - Chapter 14 - Form Handling
 JavaScript - Chapter 14 - Form Handling   JavaScript - Chapter 14 - Form Handling
JavaScript - Chapter 14 - Form Handling WebStackAcademy
 
Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.boyney123
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOMMindy McAdams
 

Tendances (20)

javascript objects
javascript objectsjavascript objects
javascript objects
 
JavaScript - Chapter 11 - Events
 JavaScript - Chapter 11 - Events  JavaScript - Chapter 11 - Events
JavaScript - Chapter 11 - Events
 
The New JavaScript: ES6
The New JavaScript: ES6The New JavaScript: ES6
The New JavaScript: ES6
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
jQuery
jQueryjQuery
jQuery
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript Tutorial
 
Advanced Javascript
Advanced JavascriptAdvanced Javascript
Advanced Javascript
 
Javascript essentials
Javascript essentialsJavascript essentials
Javascript essentials
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Asynchronous JavaScript Programming
Asynchronous JavaScript ProgrammingAsynchronous JavaScript Programming
Asynchronous JavaScript Programming
 
Angular - Chapter 4 - Data and Event Handling
 Angular - Chapter 4 - Data and Event Handling Angular - Chapter 4 - Data and Event Handling
Angular - Chapter 4 - Data and Event Handling
 
JavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM ManipulationJavaScript: Ajax & DOM Manipulation
JavaScript: Ajax & DOM Manipulation
 
Ajax
AjaxAjax
Ajax
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
 
Spring Framework - Spring Security
Spring Framework - Spring SecuritySpring Framework - Spring Security
Spring Framework - Spring Security
 
WebAssembly Overview
WebAssembly OverviewWebAssembly Overview
WebAssembly Overview
 
JavaScript - Chapter 14 - Form Handling
 JavaScript - Chapter 14 - Form Handling   JavaScript - Chapter 14 - Form Handling
JavaScript - Chapter 14 - Form Handling
 
Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.Introduction into ES6 JavaScript.
Introduction into ES6 JavaScript.
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
 

En vedette (7)

Ajax
AjaxAjax
Ajax
 
Database design
Database designDatabase design
Database design
 
Introduction to c part -1
Introduction to c   part -1Introduction to c   part -1
Introduction to c part -1
 
Threads in python
Threads in pythonThreads in python
Threads in python
 
Xml passing in java
Xml passing in javaXml passing in java
Xml passing in java
 
Ajax
AjaxAjax
Ajax
 
File oparation in c
File oparation in cFile oparation in c
File oparation in c
 

Similaire à Jquery library (20)

JQuery_and_Ajax.pptx
JQuery_and_Ajax.pptxJQuery_and_Ajax.pptx
JQuery_and_Ajax.pptx
 
J query
J queryJ query
J query
 
Jquery
JqueryJquery
Jquery
 
JQuery
JQueryJQuery
JQuery
 
JQuery
JQueryJQuery
JQuery
 
jQuery
jQueryjQuery
jQuery
 
Jquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript BasicsJquery Complete Presentation along with Javascript Basics
Jquery Complete Presentation along with Javascript Basics
 
Getting Started with jQuery
Getting Started with jQueryGetting Started with jQuery
Getting Started with jQuery
 
Jquery
JqueryJquery
Jquery
 
jQuery -Chapter 2 - Selectors and Events
jQuery -Chapter 2 - Selectors and Events jQuery -Chapter 2 - Selectors and Events
jQuery -Chapter 2 - Selectors and Events
 
Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap Advanced JQuery Mobile tutorial with Phonegap
Advanced JQuery Mobile tutorial with Phonegap
 
Jquery
JqueryJquery
Jquery
 
presentation_jquery_ppt.pptx
presentation_jquery_ppt.pptxpresentation_jquery_ppt.pptx
presentation_jquery_ppt.pptx
 
jQuery
jQueryjQuery
jQuery
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD CombinationLotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
Lotusphere 2012 Speedgeeking - jQuery & Domino, a RAD Combination
 
J query training
J query trainingJ query training
J query training
 
jQuery
jQueryjQuery
jQuery
 
J query presentation
J query presentationJ query presentation
J query presentation
 
J query presentation
J query presentationJ query presentation
J query presentation
 

Plus de baabtra.com - No. 1 supplier of quality freshers

Plus de baabtra.com - No. 1 supplier of quality freshers (20)

Agile methodology and scrum development
Agile methodology and scrum developmentAgile methodology and scrum development
Agile methodology and scrum development
 
Best coding practices
Best coding practicesBest coding practices
Best coding practices
 
Core java - baabtra
Core java - baabtraCore java - baabtra
Core java - baabtra
 
Acquiring new skills what you should know
Acquiring new skills   what you should knowAcquiring new skills   what you should know
Acquiring new skills what you should know
 
Baabtra.com programming at school
Baabtra.com programming at schoolBaabtra.com programming at school
Baabtra.com programming at school
 
99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love 99LMS for Enterprises - LMS that you will love
99LMS for Enterprises - LMS that you will love
 
Php sessions & cookies
Php sessions & cookiesPhp sessions & cookies
Php sessions & cookies
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Chapter 6 database normalisation
Chapter 6  database normalisationChapter 6  database normalisation
Chapter 6 database normalisation
 
Chapter 5 transactions and dcl statements
Chapter 5  transactions and dcl statementsChapter 5  transactions and dcl statements
Chapter 5 transactions and dcl statements
 
Chapter 4 functions, views, indexing
Chapter 4  functions, views, indexingChapter 4  functions, views, indexing
Chapter 4 functions, views, indexing
 
Chapter 3 stored procedures
Chapter 3 stored proceduresChapter 3 stored procedures
Chapter 3 stored procedures
 
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
Chapter 2  grouping,scalar and aggergate functions,joins   inner join,outer joinChapter 2  grouping,scalar and aggergate functions,joins   inner join,outer join
Chapter 2 grouping,scalar and aggergate functions,joins inner join,outer join
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Microsoft holo lens
Microsoft holo lensMicrosoft holo lens
Microsoft holo lens
 
Blue brain
Blue brainBlue brain
Blue brain
 
5g
5g5g
5g
 
Aptitude skills baabtra
Aptitude skills baabtraAptitude skills baabtra
Aptitude skills baabtra
 
Gd baabtra
Gd baabtraGd baabtra
Gd baabtra
 

Dernier

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 

Dernier (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 

Jquery library

  • 1.
  • 2. Disclaimer: This presentation is prepared by trainees of baabtra as a part of mentoring program. This is not official document of baabtra –Mentoring Partner Baabtra-Mentoring Partner is the mentoring division of baabte System Technologies Pvt . Ltd.
  • 4. Jobs Applied # Company Designation Applied Date 1 HashInclude Technologies Web Designer 09-Aug-2013 2 HashInclude Technologies PHP developer 09-Aug-2013 3 Current Status
  • 5. jQuery write less, do more SUHAIL K.P suhailkp007@gmail. com www.facebook.com /suhilkp007 twitter.com/suhilk p007
  • 6. What is jQuery? • library of JavaScript Functions. • Takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that can call with a single line of code. • simplifies 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
  • 7. Why jQuery? • There are lots of other JavaScript frameworks like MooTools, YUI , Dojo etc 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. How to install jQuery ? • You can download jQuery library from jQuery.com • • If you don't want to store the jQuery library on your own computer, you can use the hosted jQuery library from Google ,Microsoft or jQuery website. Google <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"> </script> • Microsoft <script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js"> </script> • jQuery <script type="text/javascript" src=" http://code.jquery.com/jquery-latest.js"> </script>
  • 9. How to use jQuery library? include jquery library in your HTML file as follows <html> <head> <title>The jQuery Example</title> <script type="text/javascript“ src="jquery1.3.2.min.js“ > </script> <script type="text/javascript"> // you can add our javascript code here </script> </head> <body> ........ </body> </html>
  • 10. How to call a jQuery library functions? you want an event to work on your page, you should call it inside the $(document).ready() function. Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded. To do this, we register a ready event for the document as follows: $(document).ready(function() { // do stuff when DOM is ready });
  • 11. jQuery Syntax • The jQuery syntax for selecting HTML elements and perform some action on the element(s). • Basic syntax is: $(selector).action() – A dollar sign to define jQuery(synonym of jQuery()) – A (selector) to "query (or find)" HTML elements – A jQuery action() to be performed on the element(s) • Examples: – – – – $(this).hide() - hides current element $("p").hide() - hides all paragraphs $("p.test").hide() - hides all paragraphs with class="test" $("#test").hide() - hides the element with id="test"
  • 12. Selectors • jQuery selectors allow you to select and manipulate HTML element(s). • You can instantiate the jQuery object simply by writing jQuery() or even shorter using the jQuery shortcut name: $(). Therefore, selecting a set of elements is as simple as this: $(<query >) • With the jQuery object returned, you can then start using and altering the element(s) you have matched.
  • 13. SELECT DOM ELEMENTS • Selecting DOM elements through document based on the css selectors. • The #id selector $(document).ready(function() { $(“#d1").text("Test"); }); • This code will be applied on only one element whose ID attribute is d1.
  • 14. SELECT DOM ELEMENTS(CONT’D)  The .class selector $(document).ready(function() { $(“.para").text("Test"); });  This code will be applied on all elements with the .para class
  • 15. SELECT DOM ELEMENTS(CONT’D)  The element selector $(document).ready(function() { $(“div").text("Test"); });  This code will be applied on all <div> tags
  • 16. SOME MORE EXAMPLES Syntax Description $(this) Current HTML element $("p") All <p> elements $("p.intro") All <p> elements with class="intro" $("p#intro") All <p> elements with id="intro" $("p.intro:first") The first <p> element with class="intro" $(".intro") All elements with class="intro" $("#intro") The first element with id="intro" $("ul li:first") The first <li> element of the first <ul> $("ul li:first-child") The first <li> element of every <ul> $("[href$='.jpg']") All elements with an href attribute that ends with ".jpg" $("div#intro .head") All elements with class="head" inside a <div> element with id="intro"
  • 17. JQUERY     EVENTS The jQuery event handling methods are core functions in jQuery. Event handlers are method that are called when "something happens" in HTML $("button").click(function() {..some code... } ) EX:  $(document).ready(function(){ $("button").click(function(){ $("p").hide(); }); });
  • 18. JQUERY  EVENTS(CONT’D) Here are some examples of event methods in jQuery: Event Method Description $(document).ready(function) Binds a function to the ready event of a document (when the document is finished loading) $(selector).click(function) Triggers, or binds a function to the click event of selected elements $(selector).dblclick(function) Triggers, or binds a function to the double click event of selected elements $(selector).focus(function) Triggers, or binds a function to the focus event of selected elements $(selector).mouseover(function) Triggers, or binds a function to the mouseover event of selected elements
  • 19. jQuery - DOM Traversing • which provides a variety of DOM traversal methods to help us to select elements in a document. • DOM Traversal Methods do not modify the jQuery object and they are used to filter out elements from a document based on given conditions.
  • 20. For Example : <html> <head> <title>the title</title> </head><body><div> <ul> <li>list item 1</li> <li>list item 2</li> <li>list item 3</li> <li>list item 4</li> <li>list item 5</li> <li>list item 6</li> </ul> </div> </body> </html> Above every list has its own index, and can be located directly by using eq(index), Eg: $("li").eq(1)
  • 21. jQuery - AJAX •jQuery provides several methods for AJAX functionality. jQuery load() Method  The load() method loads data from a server and puts the returned data into the selected element.
  • 22. Syntax: $(selector).load(URL,data,callback); •The required URL parameter specifies the URL you wish to load. •The optional data parameter specifies a set of querystring key/value pairs to send along with the request. •The optional callback parameter is the name of a function to be executed after the load() method is completed.
  • 25. If this presentation helped you, please visit our page facebook.com/baabtra and like it. Thanks in advance. www.baabtra.com | www.massbaab.com |www.baabte.com
  • 26. Contact Us Emarald Mall (Big Bazar Building) Mavoor Road, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550 Start up Village Eranakulam, Kerala, India. Email: info@baabtra.com NC Complex, Near Bus Stand Mukkam, Kozhikode, Kerala, India. Ph: + 91 – 495 40 25 550