Professional Documents
Culture Documents
Ad Bcom Pop Jquery (Advanced)
Ad Bcom Pop Jquery (Advanced)
Ef f
e cts, D O M
M an ip u lation &
jQuery EVENTS:
.resize()
scroll()
D ocu m en t Load in g
.load ()
.read y()
.u n load ()
Even t H an d ler
A ttach m en t
Form Even ts
.b lu r()
.ch an g e()
.focu s()
.b in d ()
.d eleg ate()
.of f
()
.keyd ow n ()
.keyp ress()
Even t O b ject
even t.typ e
M ou se Even ts
.click()
.d b lclick()
Ef f
e cts
The JQ uery library provides severaltechniques for
adding anim ations to w eb pages. Som e are very
standard anim ations that w e have used to create
pow erpoint slides
.anim ate()
.clearQ ueue()
.delay()
.dequeue()
.fadeIn()
.fadeO ut()
.fadeTo()
.fadeToggle()
.fi
nish()
.hide()
http://api.jquery.com/category/effects/
Exam p le (Ef f
e cts)
The .anim ate() function is a custom
function that allow s users to custom ize
their anim ations
SYN TAX REQ U IRED
$(selector).anim ate({param s},speed,callback);
http://w w w .w 3schools.com /jquery/eff
_anim ate.asp
D O M : D O C U M EN T O B JEC T
M O D EL
W hat is D O M ?
D ocum ent O bject M odel: A program m ing
interface to support htm l, xm land svg
docum ents. Provides a w ay to structure
docum ents.
M A N IP U LATIO N
.addClass()
.after()
.append()
.appendTo()
.attr()
.before()
.clone()
.detach()
.em pty()
.hasClass()
http://api.jquery.com/category/manipulation/
D O M M A N IP U LATIO N M ETH O D S
text() - Sets or returns the text content of
selected elem ents
htm l() - Sets or returns the content of selected
elem ents (including H TM L m arkup)
val() - Sets or returns the value of form fi
elds
Traversin g
A m ethod used to fi
nd H TM L elem ents
based on their relations to other
elem ents.
Traversin g
Traveling up the D O M
parent()
parents()
parentsU ntil()
children()
fi
n d()
siblings()
next()
nextAll()
nextU ntil()
prev()
prevAll()
prevU ntil()
Traversin g (Filterin g )
First() M ethod
last() M ethod
eq() M ethod
fi
lter() M ethod
not() M ethod
Exam p le
$(docum ent).ready(function(){
$("div p").fi
rst();
});
Exam p le
$(docum ent).ready(function(){
$("p").fi
lter(".intro");
});
D em o