Intro to jQuery with ColdFusion

Comments

There aren't any comments for this presentation.

Add Comment

Comments have been closed.

Transcript

no image

Slide Text

Slide Notes


Slide 1


Intro to jQuery with ColdFusion
Raymond Camden (ray@camdenfamily.com)
http://www.coldfusionjedi.com

no notes exist for this slide

Slide 2


JavaScript is NOT the Enemy

no notes exist for this slide

Slide 3


You can find peace

no notes exist for this slide

Slide 4


Why jQuery?
Powerful
Wide support
It works for me (after an initial period of grumpy old man whining)

no notes exist for this slide

Slide 5


History & Tidbits
Created by John Resig in January 2006
Currently version 1.3.2
Site, mailing lists, books, extensions
Used by some very large sites (big people, big people)

no notes exist for this slide

Slide 6


History & Tidbits (2)
Compatability: Firefox 2.0, IE 6+, Safari 3+, Opera 9+, Chrome 1+
Free (duh)
Download minified, compressed, or full fat.
Available via Google CDN

no notes exist for this slide

Slide 7


So what does it do?
Finds stuff
Changes stuff
Loads stuff
(And more stuff)

no notes exist for this slide

Slide 8


Signs you may be working with jQuery...
$ is jQuery
Lots and lots and lots of stuff chained together: $(something).doSomething().doSomethingElse().doSomethingMore().doSomethingAgain().heyWhyNotDoitAgain().areWeThereYet()

no notes exist for this slide

Slide 9


Quick Demo

no notes exist for this slide

Slide 10


Selectors (Finding stuff)
Follows CSS rules
With a few extras...
$( this is where you do it )

no notes exist for this slide

Slide 11


Selector Examples
$("#SOMEID")
$(".SOMECLASS")
$("TAG")

no notes exist for this slide

Slide 12


Demo
/ex2/test1.html

no notes exist for this slide

Slide 13


Selector Examples (2)
Immediate kids: $("#parent > p")
All kids: $("#parent p")

no notes exist for this slide

Slide 14


Demo
/ex2/test2.html

no notes exist for this slide

Slide 15


Selector Examples (3)
Not! $("something:not(somethingelse)")
With Something: $("img[alt]")

no notes exist for this slide

Slide 16


Demo
/ex2/test3.html

no notes exist for this slide

Slide 17


Selectors Gone Wild
Match values at the beginning: ^
Match values at the end: $
Match values anywhere: *

no notes exist for this slide

Slide 18


Demo
/ex2/test4.html

no notes exist for this slide

Slide 19


Custom Selectors
:even, :odd
:eq (numeric, ie, the Nth one)
:nth-child('even|odd|#')

no notes exist for this slide

Slide 20


Demo
/ex/test5.html

no notes exist for this slide

Slide 21


Selectors - More...
contains
form related (checked, selected, en/disabled)
next, prev, parent, children, siblings
filter

no notes exist for this slide

Slide 22


Demo
/ex2/test6.html

no notes exist for this slide

Slide 23


Manipulation
Adding, removing classes
Setting, getting attributes
Prepending, appending
Changing contents

no notes exist for this slide

Slide 24


Demo
/ex3/*

no notes exist for this slide

Slide 25


Events
What you expect (click, change, etc)
Special ones: hover, toggle
$(document).ready

no notes exist for this slide

Slide 26


Demo
/ex4/*

no notes exist for this slide

Slide 27

no text exists for this slide

no notes exist for this slide

Slide 28


Effects Support
Hiding/Showing
Fading
Slide up/down
List of changes

no notes exist for this slide

Slide 29


Demo
http://docs.jquery.com/Effects

no notes exist for this slide

Slide 30


Ajax
load
get
post
getJSON
getScript

no notes exist for this slide

Slide 31


Demo
/ex5 (hey Ray, don't show test5.html yet)

no notes exist for this slide

Slide 32


Plugins
Approx 2,400
Wide range of areas: UI, Forms, Widgets, Etc
Quality also covers a wide range

no notes exist for this slide

Slide 33


My Favorites
Validate
http://plugins.jquery.com/project/validate
Thickbox
http://jquery.com/demo/thickbox/
jqGrid
http://www.trirand.com/blog/
jQuery Select
http://www.texotela.co.uk/code/jquery/select/

no notes exist for this slide

Slide 34


jQuery+ColdFusion

no notes exist for this slide

Slide 35


CF: Helpful Things
Still the Glue
Native JSON support
returnFormat
XML generation (by hand, but still easy)

no notes exist for this slide

Slide 36


CF: Not-So Helpful Things
onRequest (EVIL++) (Fixed in ColdFusion 9!)
Whitespace
Debugging

no notes exist for this slide

Slide 37


Demo
/ex7 (yes, I skipped /ex6, but pretend you didn't notice)

no notes exist for this slide

Slide 38


Where next?
Listserv: http://groups.google.com/group/jquery-en
Books: Many, but I recommend: Learning jQuery 1.3

no notes exist for this slide

Slide 39


Any Questions?
My email: ray@camdenfamily.com
My blog: www.coldfusionjedi.com
My other blog: www.insideria.com

no notes exist for this slide