0% found this document useful (0 votes)
11 views15 pages

JQuery Training Manual

Uploaded by

nani031nani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views15 pages

JQuery Training Manual

Uploaded by

nani031nani
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Jquery

Palle Technologies
V 2.0
jquery
• Jquery is a javascript library (it contains
predefined functions,constuctors,properties
etc)
• Jquery extension is .js
____ .js

Predefined
functions,constuctors,
properties ………..etc
jquery
• Jquery will reduce the JavaScript code for
implementing client side functionality
• Jquery will reduce dom manipulations code
• jquery is case sensitive
• Note: in JavaScript & jquery all function
parameters are optional.
accessing predefined jq code
a.html
Linking jquery and html

Jquery.3.3.1 .js

ajax();
jquery constuctor

//Jquery constructor

value parameter is optional


accessing DOM nodes
In JavaScript

html
In JQuery

head body
Jquery constructor
Types of selectors
Class selectors input
id value
Id selectors Name type
Element selector “text” “tbName” “palle”
Elements with attribute selectors class onclick
------------
we can use other css3 selectors “R”
------------
as well
Jquery selectors are useful for identifying
Node references in the DOM tree
selectors in jquery

Id selectors
input
id value
type
Class selectors “text” “tbName” “palle”
class onclick
“R” ------------
Element selector ------------

Elements with attribute selectors


selecting multiple elements
html

head body

If you want to select ddl3


select select select
id “ddl1” id “ddl2” id “ddl3”
-------
- - - ---- - - - - -- - - - -

oddl pointer pointer pointer

0 1 2

If we have multiple select elements it will internally create an array


and store the values in each cell
make ppt for value vs value()
• we must use jquery functions or properties
when the dom node reference is created
using jquery ( when the jquery functions or
properties overriding the JavaScript props or
functions )
var x= document.getElementById(‘tbName’) ;

reference created
x using javascript x.value

input
type id value
“text” “tbName” “palle”
…… …… ……
……. ……. …….
var y= $(‘#tbName’) ; x.value x.val()

reference created using jquery. now y refers to


jquery library of functions
y
input ……
type id value ……
“tbName” “palle” val()
“text”
…….
…… …… …… …….
……. ……. ……. ……..

now we must use the val() jquery function to


read or modify the actual value dom prop
chaining
• By using chaining we can
– perform same action on multiple elements
without writing repeating code
– perform multiple actions on same element
without writing repeating code
DataCopier.html

Input: palle

copy

palle palle palle palle


selector chaining sample
DataCopier.html

Input: palle

copy

palle palle palle palle

//same output
function chaining sample

Style_DataCopier.html

Data: palle bc: red fc: white

copy

palle
function chaining sample solution
Style_DataCopier.html

Data: palle bc: red fc: white

copy

palle

//same output

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy