Table of Contents
[
iv
]
Installing the WordPress plugin 127
Setting up the registration form with cforms II 127
Creating the register page using WordPress 3.0s custom menu option 130
Working with WordPress 3.0s custom menu option 132
Customizing the theme 134
Creating the custom page template 134
Creating the custom category template 137
Getting jQuery in on the game plan 141
Including the ColorBox plugin 142
Writing a custom jQuery script 143
Pulling it all together: One tiny cforms II hack required 145
Part 2: Form validation—make sure that whats submitted is right 147
The trick to client-side validation: Dont just tell them when its wrong 148
Blank input validation 149
Properly formatted e-mail validation 151
Final thoughts and project wrap up: Its all about graceful degrading 154
Summary 156
Chapter 5: jQuery Animation within WordPress 157
jQuery animation basics 157
CSS properties made magical 158
Making it colorful 159
Taking it easy, with easing control 160
Timing is everything: Ordering, delaying, and controlling the animation que
162
Getting your ducks in row: Chain em up 162
Delay that order 163
Jumping the queue 164
Stepping to completion 165
Grabbing the users attention 167
Project: Animating an alert sticky post 167
Creating easy, animated graphs 170
Delving deeper into animation 177
Project: Creating snazzy navigation 177
Project: Creating rotating sticky posts 182
Putting in a little extra effort: Adding a loop indicator 190
Summary 192
Chapter 6: WordPress and jQuerys UI 193
Getting to know jQuerys UI plugin 194
Widgets 194
Interactions 195
Effects 196
jQuery UI plugin versions bundled in WordPress 196
Picking and choosing from the jQuerys UI site 197
www.it-ebooks.info
Table of Contents
[
v
]
Making it look right: Easy UI theming 199
Including the jQuery UI plugin features into your WordPress site 200
Including jQuerys UI from WordPress bundle 200
Including from the Google CDN 201
Loading up your own custom download from your theme or plugin directory 202
Dont forget your styles 202
Enhancing effects with jQuery UI 203
Effects made easy 204
Easing is just as easy 204
Color animation with jQuery UI 205
Enhancing the user interface of your WordPress site 206
Project: Turning posts into tabs 206
Setting up custom loops in the WordPress theme 207
Implementing tabs entirely with jQuery 210
Project: Accordion-izing the sidebar 213
Project: Adding a dialog box to a download button with icons 216
Summary 222
Chapter 7: AJAX with jQuery and WordPress 225
What AJAX is and isnt: A quick primer 225
AJAX: Its better with jQuery 226
Assessing if AJAX is right for your site—a shorter disclaimer 227
Getting started with jQuerys AJAX functionality 227
Using the .ajax function 227
Taking shortcuts 230
Specifying where to .load it 230
Transforming loaded content 232
Project: Ajaxifying posts 233
.getJSON: The littlest birds get the most re-tweets 237
JSON and jQuery basics 237
What JSON looks like 237
Using JSON in jQuery 238
Using .getJSON with Twitter 238
Using Twitters user timeline method 239
Using getJSON with Flickr 242
Other popular services that offer APIs with JSON format 243
Project: Ajax-izing the built-in comment form 244
Summary 249
Chapter 8: Tips and Tricks for Working with jQuery and WordPress