A B C D E F G H I J K L M N O P Q R S T U V W X-Y-Z
<a> element, 78
abort event, 228
abort() method, 421
abs() method, 176
ACCEPT header, 10
accept option (droppable widget), 499
accept rule (form validation), 354
accessing
data outside the web page, 285, 295
browser history object, 289
browser location object, 285
external links, controlling, 290
DOM (Document Object Model), 137-141
finding objects by class name, 189
finding objects by ID, 189
finding objects by tag name, 189-190
with jQuery selectors, 139, 201-203
with traditional JavaScript, 139
form elements, 326
button inputs, 330
check box inputs, 328
hidden inputs, 331
server-side data with AJAX, 406-408
asynchronous communication, 397
compared to page requests, 395-396
cross-domain requests, 397-398
global event handlers, 419
implementing from JavaScript, 399-401
implementing from jQuery, 401-404
low-level AJAX requests, handling, 420-422
overview, 395
request handling, 397
response data, handling, 405, 408-414
response data types, 399
server data, updating, 415-419
accordian widget, 522
accounts (Google), creating, 439
active option (tabs widget), 534
activeClass option (droppable widget), 499
.add() method, 211
.addClass() method, 188, 271, 482
addEventListener() method, 232-236
addFBsdk() function, 427, 431-432
addItem() function, 378
adjValues() function, 390
.after() method, 270
AJAX (Asynchronous JavaScript and XML)
asynchronous communication, 397
bypassing, 562
compared to page requests, 395-396
cross-domain requests, 397-398
global event handlers, 419
implementing from JavaScript, 399-401
implementing from jQuery, 401-404
login requests, handling, 405-408
low-level AJAX requests, handling, 420-422
request handling, 397
response data, handling, 405, 408-414
XML/HTML response data, handling, 412-414
response data types, 399
updating server data with, 415-419
.ajaxComplete() method, 419
.ajaxError() method, 419
.ajaxSend() method, 419
.ajaxSetup() method, 419
.ajaxStart() method, 419
.ajaxStop() method, 419
.ajaxSuccess() method, 419
alsoResize option (resizable widget), 504
altKey property (events), 225
analyzing network traffic, 59-62
.andSelf() method, 211
animations
adding to form elements, 346-351
animation queues, 302
CSS settings, animating, 301-303
delaying, 304
.hide() method, 305
element position changes on nonstatic elements, 319
element position changes on static elements, 319
overview, 301
.promise() method, 305
sliding animation, 312
dynamic menu sample project, 314-316
.slideDown() method, 312
.slideToggle() method, 312
.slideUp() method, 312
width and height, 312
visibility
fade animation to implement image selection effect, 311
.fadeIn() method, 309
.fadeOut() method, 309
.fadeTo() method, 310
.fadeToggle() method, 309
.append() method, 268
appendChild() method, 187, 267
.appendTo() method, 268
appendTo option (selectable widget), 508
Aptana Studio
arithmetic operators, 143
adding/removing items, 171
checking whether array contains an item, 171
combining, 169
converting to strings, 171
iterating through, 169
aspectRatio option (resizable widget), 504
assign() method, 285
assignment operators, 143
associative arrays, 143
asynchronous communication, 397
Asynchronous JavaScript and XML. See AJAX (Asynchronous JavaScript and XML)
at option (.position() method), 467
attribute jQuery selectors, 193-195
<audio> element, 94
AUTHORIZATION header, 11
autoHide option (resizable widget), 504
availHeight property (screen object), 285
availWidth property (screen object), 285
axis option
draggable widget, 495
sortable widget, 513
back button, 557
background-attachment property (CSS), 111
background-color property (CSS), 111
background-image property (CSS), 111
background-position property (CSS), 111
background-repeat property (CSS), 111
background-size property (CSS), 111
backgrounds, applying with CSS, 111
basic jQuery selectors, 193-194
.before() method, 270
bind() method, 236
blind effect, 476
blur event, 228
blurring form elements, 339
<body> element, 66
Boolean data type, 142
border attribute (table elements), 80
border-color property (CSS), 117
border-radius property (CSS), 117
border-style property (CSS), 117
border-width property (CSS), 117
borders, applying with CSS, 117-121
bounce effect, 476
box-shadow property (CSS), 117
break keyword, 152
browser development tools, 21-22
Internet Explorer developer tools, 22-23
JavaScript console in Chrome, 22
browser values, accessing, 260-266
browsers. See also browser development tools
browser window, 7
events, 7
history object, 289
Internet Explorer developer tools, 22-23
location object, 285
overview, 6
buildData() function, 372
<button> element, 83
button inputs, 330
.button() method, 524
button property (events), 225
buttonImage option (datepicker widget), 525
buttonImageOnly option (datepicker widget), 525
buttons
Follow button, 445
Like button, 427
in mobile forms, 603
navigation buttons
back button, 557
creating, 556
positioning, 557
Send button, 428
Tweet button, 444
buttons option (dialog widget), 527
.buttonset() method, 524
bypassing AJAX, 562
calendar input, creating, 525-526
callbacks, 251
deferred objects, 252
cancel option (mouse interaction widget), 494
cancelable property (events), 225
Cascading Style Sheets. See CSS (Cascading Style Sheets)
ceil() method, 176
center attribute (mapOptions), 433
center_changes event, 434
chaining jQuery object operations, 205-206
change event, 228
change option (slider widget), 531
changeCheckbox() function, 347, 349
changeRadio() function, 347, 349
changing classes, 270
charAt() method, 165
charCode property (events), 225
charCodeAt() method, 165
checkStatus() method, 296
childNodes attribute (DOM objects), 187
.children() method, 208
Chrome JavaScript console, 22
class name, finding DOM objects by, 189
classes. See specific classes
className attribute, 260
clearInterval() method, 287, 296
clearTimeout() method, 287, 296
click event, 229
client-side scripts, 14
clientX property (events), 225
clientY property (events), 225
clip effect, 476
close() method, 287
closed property (window object), 287
.closest() method, 208
collapsible blocks and sets, 590-592
collapsible option
accordian widget, 522
tabs widget, 534
collision option (.position() method), 467
colorDepth property (screen object), 285
colspan attribute (table elements), 80
columntogglemode (tables), 596
combining
arrays, 169
comment fields, 428
compare() function, 373
comparison operators
if, 146
switch, 147
table of, 145
complete option (.animate() method), 302
concat() method, 164-166, 169-170
configuring
browser development tools, 21-22
Internet Explorer developer tools, 22-23
JavaScript console in Chrome, 22
jQuery Mobile default settings, 548
confirmation pop-ups, 295
connectTo option (sortable widget), 513
containment option
draggable widget, 495
resizable widget, 503
content jQuery selectors, 193-196
content option (tooltips widget), 535
content size, setting with CSS, 123
CONTENT-LENGTH header, 11
CONTENT-TYPE header, 11
.contents() method, 208
continue keyword, 152
continueNotify() function, 298
controls attribute (Map), 434
converting
arrays to strings, 171
COOKIE header, 11
cos() method, 176
create event, 494
createElement() method, 267
createEvent() method, 241
createPopup() method, 287
createTextNode() method, 267
creditcard rule (form validation), 354
cross-domain requests, 397-398
CSS (Cascading Style Sheets), 9
to headers, 99
to HTML body, 99
animating CSS settings, 301-303
debugging, 46
with Firebug CSS inspector, 46
with Firebug Layout inspector, 47-52
with Firebug Style inspector, 47
defining in HTML elements, 99-100
design properties
backgrounds, 111
cursor, 121
visibility, 122
graphical equalizer display, 385-389
layout properties, 122
content size, 123
laying out web page components with, 127-130
margins, 124
overflow, 126
padding, 123
loading from file, 98
overview, 97
preparing for dynamic design, 130
css files, 544
CSS inspector (Firebug), 46
ctrlKey property (events), 225
culture option (spinner widget), 533
currentTarget property (events), 225
cursor option
CSS (Cascading Style Sheets), 121
draggable widget, 495
sortable widget, 513
custom events, 249
in jQuery, 250
custom Google searches, 439-443
custom-defined objects
defining objects, 177
prototyping object patterns, 178-179
data attributes
mobile web pages, 545
.data() method, 331
data property (events), 225
:data() selector, 465
data types
AJAX response data types, 399
data-add-back-btn attribute, 546
data-align attribute, 445
data-close-btn attribute, 546
data-collapsed attribute, 546
data-collapsed-icon attribute, 546
data-corners attribute, 600
data-count attribute, 444
data-counturl attribute, 444
data-direction attribute, 546
data-hashtags attribute, 444
data-iconpos attribute, 546, 600
data-position attribute, 555-556
data-rel attribute, 546
data-related attribute, 444
data-show-count attribute, 445
data-show-screen-name attribute, 445
data-text attribute, 444
data-theme attribute, 546, 600
data-title attribute, 546
data-transition attribute, 546
data-type attribute, 600
data-url attribute, 444
data-via attribute, 444
data-width attribute, 445
date rule (form validation), 354
dateFormat option (datepicker widget), 526
dateISO rule (form validation), 354
dblclick event, 228
debugging
CSS (Cascading Style Sheets), 46
with Firebug CSS inspector, 46
with Firebug Layout inspector, 47-52
with Firebug Style inspector, 47
HTML elements, 40
with Firebug HTML inspector, 40-44
jQuery, 59
network traffic analysis, 59-62
overview, 35
deferred objects, 252
.delay() method, 304
delay option (mouse interaction widget), 494
delay timers, 296
delaying animations, 304
delegateTarget property (events), 225
design properties (CSS)
backgrounds, 111
cursor, 121
visibility, 122
destroy() method, 494
.detach() method, 269
development environment
dialogs
adding to mobile web pages, 571-576
digits rule (form validation), 354
disable() method, 494
disabled attribute (form elements), 84
disabling
form elements, 339
mobile forms, 600
dispatchEvent() method, 241
displayCookies() function, 292-293
displayTime() function, 298
distance option (mouse interaction widget), 494
do/while loops, 150
Document Object Model. See DOM (Document Object Model)
DOM (Document Object Model), 6-7
with jQuery selectors, 139
with traditional JavaScript, 139
editing with Firebug DOM inspector, 44-45
events
filtering DOM elements in jQuery objects, 206-207
objects
attributes, 187
converting to/from jQuery, 188-189
determining whether an object is DOM or jQuery, 188
finding by ID, 189
methods, 187
traversing with jQuery objects, 207-209
DOM inspector (Firebug), 44-45
downloading
jQuery Mobile library, 543-544
jQuery UI, 459
drag event, 496
drag-and-drop widgets
dragstart event, 496
dragstop event, 496
drop effect, 476
drop event, 500
dropactivate event, 500
dropout event, 500
dropover event, 500
dynamic scripts, writing, 30-32
E method, 176
easing
applying to class transitions, 482-484
easing option (.animate() method), 303
editing DOM (Document Object Model), 44-45
effects, 475
adding
to element visibility transitions, 485-487
element() method, 356
elements. See specific elements
<ellipse> element, 87
email rule (form validation), 354
.empty() method, 269
.end() method, 212
.eq() method, 207
equalTo rule (form validation), 354
error event, 228
error handling
finally keyword, 158
try/catch blocks, 157
errorPlacement attribute (Validation object), 358
escape codes, 164
event handlers, 136-137, 230-231
event option (tabs widget), 534
eventPhase property (events), 225
events
browser events, 7
callbacks, 251
deferred objects, 252
custom events, 249
in jQuery, 250
draggable widget, 496
droppable widget, 499
global event handlers, 419
for initialization
JavaScript onload event, 229-230
jQuery initialization code, 230
Map object, 434
overview, 223
resizable widget, 505
selectable widget, 509
triggering manually
exp() method, 176
explode effect, 476
external links, controlling, 290
Facebook social elements, adding, 425-426
comment fields, 428
Like button, 427
Send button, 428
fade animation, 311
fade effect, 476
fade() function, 274
.fadeIn() method, 309
.fadeOut() method, 309
.fadeTo() method, 310
.fadeToggle() method, 309
fb-like class, 427
fb-send class, 428
<fieldset> element, 83
files
css files, 544
js files, 544
loading CSS styles from, 98
naming, 27
.filter() method, 207
filter option (selectable widget), 508
filterColumn() function, 372
filtered jQuery selectors, 193-199
finally keyword, 158
.find() method, 209
finding DOM objects
by class name, 189
by ID, 189
Firebug
CSS inspector, 46
Style inspector, 47
fireEvent() method, 243
.first() method, 207
fixed headers/footers, 555-556
Flickr images, adding, 451-456
floor() method, 176
flow control, 338
controlling submit and reset, 340
disabling elements, 339
focusing and blurring form elements, 339
hiding and showing elements, 339
focus event, 228
:focusable() selector, 465
focusin event, 228
focusing and blurring form elements, 339
focusout event, 228
fold effect, 476
folders, Images, 544
Follow button, 445
font property (CSS), 106
form jQuery selectors, 193-198
form() method, 356
<form> element, 83
forms
flow control, 338
controlling submit and reset, 340
disabling elements, 339
focusing and blurring form elements, 339
hiding and showing elements, 339
button inputs, 330
check box inputs, 328
disabling, 339
focusing and blurring, 339
hidden inputs, 331
hiding and showing, 339
mobile forms, 599
buttons, 603
data attributes, 599
disabling, 600
labels, 600
radio and check box groups, 608
refreshing, 601
submitting, 601
text elements, 601
overview, 325
serializing form data, 332-333
validating, 351
jQuery validation plug-in, 352
simple jQuery validation with HTML, 352-354
validation rules, 354
fromCharCode() method, 165
functions. See also specific functions
passing variables to, 153
returning values from, 154
generating tables, 84
geometric shapes, 87
.get() method, 401
getAllResponseHeaders() method, 422
getAttribute() method, 187
getCenter() method, 434
getCookie() function, 291, 293
getElementById() function, 139, 189
getElementsByClass() method, 189
getElementsByTagName() method, 189-190
getMapTypeId() method, 434
getRandomArray() function, 390
getResponseHeader() method, 422
.getScript() method, 401
getTilt() method, 434
getTrip() method, 418
getZoom() method, 434
ghost option (resizable widget), 504
global event handlers, 419
Globalize jQuery plug-in, 533
Google accounts, creating, 439
Google search, adding, 439-443
graphical equalizer display, 385-389
graphics. See also animations
adding with <img> element, 78-79
fade animation to implement image selection effect, 311
Flickr images, adding, 451-456
geometric shapes, 87
scalable vector graphics
adding to web pages, 87
<svg> element, 87
greedy option (droppable widget), 499
groups_pool feed, 451
handles option (resizable widget), 504
.has() method, 207
hash property (location object), 285
header option (accordian widget), 522
headers
headers attribute (table elements), 81
height property (screen object), 285
helper option
draggable widget, 495
resizable widget, 503
sortable widget, 513
hidden inputs, 331
hide and show animations, 306
.hide() method, 188, 271-272, 305, 339, 485
hiding
form elements, 339
labels, 600
hierarchy jQuery selectors, 193
highlight effect, 476
history object, 289
host property (location object), 285
hostname property (location object), 285
hoverClass option (droppable widget), 499
href property (location object), 285
HTML (Hypertext Markup Language). See also CSS (Cascading Style Sheets); HTML5
debugging
with Firebug DOM inspector, 44-45
with Firebug HTML inspector, 40-44
elements
<a>, 78
attributes, 73
<audio>, 94
block versus inline elements, 73-75
<body>, 66
<button>, 83
components of, 67
defining CSS styles in, 99-100
<fieldset>, 83
<form>, 83
<input>, 83
<label>, 83
<legend>, 83
<li>, 79
<link>, 72
<ol>, 79
<option>, 83
<select>, 83
<style>, 70
<table>, 80
<textarea>, 83
<ul>, 79
event handers, assigning, 231-232
XML/HTML response data, handling, 412-414
HTML5, 8
<ellipse>, 87
<polygon>, 87
<svg>, 87
<video>, 94
HTTP (Hypertext Transfer Protocol)
GET requests, 11
overview, 10
POST requests, 11
Hypertext Markup Language. See HTML (Hypertext Markup Language)
Hypertext Transfer Protocol. See HTTP (Hypertext Transfer Protocol)
IDs
finding DOM objects by, 189
if operator, 146
images. See graphics
images folder, 544
inc() function, 529
indexOf() method, 165-166, 170-171
initialization
jQuery initialization code, 230
innerHeight() method, 259
innerHeight property (window object), 286
innerHTML attribute (DOM objects), 187
innerWidth() method, 259
innerWidth property (window object), 286
<input> element, 83
installing
instances of objects, creating, 161
interactive tables with sorting and filters, 371-377
interation widgets. See widgets
Internet Explorer developer tools, 22-23
isDefaultPrevented() method, 227
isImmediatePropagationStopped() method, 227
isNaN() function, 163
isPropagationStopped() method, 227
items option
sortable widget, 513
tooltips widget, 535
iterating through arrays, 169
JavaScript
browser values, accessing, 260-266
debugging
with JavaScript console, 35-39
with JavaScript debugger, 53-59
overview, 35
development environment
browser development tools, 21-22
error handling
finally keyword, 158
try/catch blocks, 157
events
executing with event handlers, 136-137
external links, controlling, 290
forms. See forms
functions
passing variables to, 153
returning values from, 154
image gallery, adding, 365-370
implementing AJAX from, 399-401
interactive tables with sorting and filters, 371-377
do/while loops, 150
while loops, 150
methods. See individual methods
objects. See objects
operators, 143
arithmetic operators, 143
assignment operators, 144
overview, 14
page elements
adding, 267
class name, 260
classes, changing, 270
manipulating dynamically, 273-276
rearranging dynamically, 277-282
size, 258
page load events for initialization, 229-230
confirmation pop-ups, 295
notification pop-ups, 295
simple example, 14
timers, 296
delay timers, 296
reoccurring timers, 296
Twitter JavaScript API library, 443-444
variables
passing to functions, 153
JavaScript console (Chrome), 22
JavaScript debugger (Firebug), 53-59
jQuery. See also jQuery Mobile; jQuery UI
animations
animation queues, 302
CSS settings, animating, 301-303
delaying, 304
overview, 301
.promise() method, 305
show and hide animations, 305-308
browser values, accessing, 260-266
development environment
browser development tools, 21-22
event handlers, applying, 236-241
events
custom events, 250
forms. See forms
graphical equalizer display, 385-389
implementing AJAX from, 401-404
initialization code, 230
interactive tables with sorting and filters, 371-377
methods. See individual methods
chaining jQuery object operations, 205-206
converting to/from DOM, 188-189
deferred objects, 252
determining whether an object is DOM or jQuery, 188
filtering jQuery object results, 206-207
manipulating DOM elements with, 211-217
traversing DOM with, 207-209, 217-220
overview, 14
page elements
class name, 260
classes, changing, 270
inserting, 270
manipulating dynamically, 273-276
rearranging dynamically, 277-282
size, 258
values, 257
selectors
hierarchy selectors, 196
overview, 193
visibility selectors, 198
jQuery Mobile
advantages of, 543
data attributes, 545
default settings, 548
downloading jQuery Mobile library, 543-544
events, 547
methods. See individual methods
mobile forms, 599
buttons, 603
data attributes, 599
disabling, 600
labels, 600
radio and check box groups, 608
refreshing, 601
submitting, 601
text elements, 601
mobile web pages, 553
bypassing AJAX, 562
changing with jQuery code, 557-559
collapsible blocks and sets, 590-592
fixed headers/footers, 555-556
page transitions, 562
panels, 592
pop-ups, 594
size, 542
ThemeRoller, 544
viewport meta tag, 548
jQuery UI
downloading, 459
effects, 475
adding to class transitions, 482-484
adding to element visibility transitions, 485-487
adding to jQuery objects, 478-482
methods. See individual methods
overview, 459
positioning elements with, 468-472
selectors
:data(), 465
:focusable(), 465
:tabbable(), 465
accordian widget, 522
attribute values, 522
jQuery.widget factory, 493-494
mouse interaction widget, 494
jQuery.widget factory, 493-494
js files, 544
JSON response data, handling, 408-411
JSONP (JSON with Padding), 398
keydown event, 228
keyup event, 228
keywords. See specific keywords
<label> element, 83
labels, 600
.last() method, 207
lastIndexOf() method, 165, 170
Layout inspector (Firebug), 47-52
layout properties, 122
content size, 123
laying out web page components with, 127-130
margins, 124
overflow, 126
padding, 123
<legend> element, 83
letter-spacing property (CSS), 106
<li> element, 79
Like button, adding, 427
line-height property (CSS), 107
lineTo() function, 92
<link> element, 72
linking mobile web pages, 559-562
links
adding with <a> element, 78
external links, controlling, 290
link elements, 78
adding to mobile web pages, 588-590
adding to web pages, 79
basic lists, 585
list elements, 79
nested lists, 586
searchable lists, 587
split-button lists, 586
LN10() method, 176
load event, 228
loading
CSS styles, 98
.loadPage() method, 557
location object, 285
login requests, handling with AJAX, 405-408
do/while loops, 150
while loops, 150
low-level AJAX requests, handling, 420-422
manually validating forms, 351-352
Map object, 434
Maps (Google), adding, 432-439
mapTypeId attribute (mapOptions), 433
maptypeid_changed event, 434
margins, adding with CSS, 124
match() method, 165
max() method, 176
max option (slider widget), 531
max rule (form validation), 355
maxlength rule (form validation), 355
media elements, 94
memory flag (callbacks), 251
menus
metaKey property (events), 225
methods. See also individual methods
accessing, 162
adding to JavaScript objects, 177-178
assigning to objects, 162
min() method, 176
min rule (form validation), 354
minlength rule (form validation), 355
mobile forms, 599. See also mobile web pages
buttons, 603
data attributes, 599
disabling, 600
labels, 600
radio and check box groups, 608
refreshing, 601
submitting, 601
text elements, 601
mobile web pages. See also jQuery Mobile; mobile forms
bypassing AJAX, 562
changing with jQuery code, 557-559
collapsible blocks and sets, 590-592
fixed headers/footers, 555-556
basic lists, 585
nested lists, 586
searchable lists, 587
split-button lists, 586
back button, 557
creating, 556
positioning, 557
page transitions, 562
panels, 592
pop-ups, 594
size, 542
modal option (dialog widget), 527
mouse cursor types, 121
mouse interaction widget, 494
mouse position, getting, 255-256
mousedown event, 228
mouseenter event, 228
mouseleave event, 228
mousemove event, 228
mouseout event, 228
mouseover event, 228
mouseup event, 228
moveBy() method, 288
element position changes on nonstatic elements, 319
element position changes on static elements, 319
my option (.position() method), 469
name attribute
form elements, 84
window object, 287
naming files, 27
back button, 557
creating, 556
positioning, 557
nested lists, 586
network traffic analysis, 59-62
.next() method, 209
.nextAll() method, 209
.nextUntil() method, 209
.not() method, 207
notification pop-ups, 295
null data type, 143
number data type, 142
Number object, 163
number rule (form validation), 355
numberFormat option (spinner widget), 533
numberOfInvalids() method, 356
numberofMonths option (datepicker widget), 526
objects, 143
adding/removing items, 171
checking whether array contains an item, 171
combining, 169
converting to strings, 171
iterating through, 169
browser
history object, 289
location object, 285
creating
instances, 161
JavaScript objects, 177, 180-181
deferred objects, 252
determining type of, 188
DOM objects
attributes, 187
finding by ID, 189
methods, 187
jQuery objects
chaining jQuery object operations, 205-206
manipulating DOM elements with, 213-217
methods, 188, 207, 209, 213-217
traversing DOM with, 206-209, 217-220
Map, 434
methods, 162
assigning, 162
Number, 163
overview, 161
properties, 162
prototyping object patterns, 178-179
RegExp, 175
converting arrays to, 171
escape codes, 164
replacing words in, 166
searching for substrings, 166
splitting into arrays, 166
window, 285
XMLHttpRequest, 399
of option (.position() method), 469
.offsetParent() method, 209
<ol> element, 79
once flag (callbacks), 251
onreadystatechange event handler, 400
onSelect option (datepicker widget), 525
opacity property
CSS (Cascading Style Sheets), 121-122
draggable widget, 495
sortable widget, 513
opener property (window object), 286
operators, 143
arithmetic operators, 143
assignment operators, 144
comparison operators
if, 146
switch, 147
table of, 145
option() method, 494
<option> element, 83
orientation option (slider widget), 531
outerHeight() method, 259
outerHeight property (window object), 286
outerHTML attribute (DOM objects), 187
outerWidth() method, 259
outerWidth property (window object), 287
overflow property (CSS), 126
padding, applying with CSS, 123
page elements. See also HTML (Hypertext Markup Language)
adding
in JavaScript, 267
classes, changing, 271
className attribute, 260
CSS properties, setting, 257-258
element visibility transitions, 485-487
graphical equalizer display, 385-389
inserting, 270
manipulating dynamically, 273-276
mouse position, getting, 255-256
position
positioning with jQuery UI, 468-472
rearranging dynamically, 277-282
tables
adding to mobile web pages, 595-597
generating, 84
interactive tables with sorting and filters, 371-377
values
getting/setting in JavaScript, 256-257
getting/setting in jQuery, 257
page transitions in mobile web pages, 562
pageXOffset property (window object), 287
pageYOffset property (window object), 287
panBy() method, 434
panels, 592
panTo() method, 434
.parent() method, 209
parent property (window object), 287
parentNode attribute (DOM objects), 187
.parents() method, 210
.parentsUntil() method, 210
passing variables to functions, 153
pathname property (location object), 285
photos_public feed, 451
PI() method, 176
pixelDepth property (screen object), 286
placeholder option (sortable widget), 513
placing validation messages, 357-358
plug-ins, jQuery validation, 352
<polygon> element, 87
pop() method, 170
.popup() method, 594
confirmation pop-ups, 295
notification pop-ups, 295
port property (location object), 285
position option (tooltips widget), 536
positioning
HTML elements from CSS, 125-126
navigation buttons, 557
page elements, 258-260, 468-472
.post() method, 401
pow() method, 176
.prev() method, 210
.prevAll() method, 210
.preventDefault() method, 227, 340
.prevUntil() method, 210
print() method, 288
projects
creating, 28
CSS (Cascading Style Sheets), adding, 27-30
dynamic scripts, writing, 30-32
file naming, 27
.promise() method, 305
.prop() method, 327
properties (CSS)
design properties
backgrounds, 111
cursor, 121
visibility, 122
layout properties, 122
content size, 123
margins, 124
overflow, 126
padding, 123
z-index, 126
properties (object)
accessing, 162
location object, 285
protocol property (location object), 285
prototyping object patterns, 178-179
puff effect, 476
pulsate effect, 476
push() method, 170
querySelectorAll() method, 207
queue option (.animate() method), 303
queues, animation, 302
radio buttons in mobile forms, 608
randInt() function, 372
range option (slider widget), 531
range rule (form validation), 355
rangelength rule (form validation), 355
.ready() method, 230
readyState attribute (jqXHR object), 422
rearranging page elements, 277-282
reflow mode (tables), 596
refreshing forms, 601
RegExp object, 175
relatedTarget property (events), 225
reload() method, 285
remote rule (form validation), 355
.remove() method, 269
removeAttr() method, 328
.removeClass() method, 271, 482
removeElement() method, 268
removeEventListener() function, 233
.removeUniqueId() method, 464
removing
items from arrays, 171
renderSpark() function, 390
reoccurring timers, 296
replace() method, 165-166, 285
.replaceAll() method, 270
.replaceWith() method, 270
replacing
words in strings, 166
requests
cross-domain requests, 397-398
low-level AJAX requests, 420-422
request handling (AJAX), 397
required rule (form validation), 355
.reset() method, 340
resetForm() method, 356
resizeBy() method, 288
resizestart event, 505
resizestop event, 505
resizeTo() method, 288
.resolve() method, 252
response attribute (XMLHttpRequest object), 400
response data, handling
XML/HTML response data, 412-414
response data types, 399
responseText attribute (XMLHttpRequest object), 400
results property (events), 225
return keyword, 154
reverse() method, 170
revert option (draggable widget), 495
round() method, 176
rowspan attribute (table elements), 81
rules, validation, 354
scalable vector graphics
adding to web pages, 87
geometric shapes, 87
scale effect, 477
screenX property
events, 225
window object, 287
screenY property
events, 225
window object, 287
scripts
client-side scripts, 14
debugging
CSS (Cascading Style Sheets), 46-52
with JavaScript console, 35-39
jQuery, 59
network traffic analysis, 59-62
overview, 35
dynamic scripts, writing, 30-32
overview, 12
scroll event, 229
scroll option (sortable widget), 513
scrollBy() method, 288
.scrollParent() method, 464
scrollTo() method, 288
search (Google), adding to web pages, 439-443
search() method, 165
search property (location object), 285
searchable lists, 587
searching strings, 166
select event, 229
select menus in mobile forms, 610-612
<select> element, 83
selectableselected event, 508
selectableselecting event, 508
selectablestart event, 508
selectablestop event, 509
selectableunselect event, 509
selectableunselected event, 509
selectors
CSS (Cascading Style Sheets), 102-104
jQuery
:data(), 465
:focusable(), 465
:tabbable(), 465
accessing DOM with, 139
hierarchy selectors, 196
overview, 193
visibility selectors, 198
self property (window object), 287
Send button, 428
send() method, 400
sending AJAX requests from jQuery, 402-404
sendRating() method, 418
.serialize() method, 332
.serializeArray() method, 333
serializing form data, 332-333
servers. See web servers
server-side data, accessing with AJAX
asynchronous communication, 397
compared to page requests, 395-396
cross-domain requests, 397-398
global event handlers, 419
login requests, handling, 405-408
low-level AJAX requests, handling, 420-422
overview, 395
request handling, 397
response data, handling, 405, 408-414
XML/HTML response data, handling, 412-414
response data types, 399
server data, updating, 416-419
SET-COOKIE header, 11
setAttribute() method, 187
setCenter() method, 434
setCookie() function, 291, 293
setDoc() function, 274
setDocNav() function, 273
setImages() function, 454
setInterval() method, 288, 296
setList() method, 418
setMapTypeId() method, 434
setRequestHandler attribute (XMLHttpRequest object), 400
setRequestHeader() method, 422
setTimeout() method, 288, 296, 529
setTitle() method, 434
setTrip() method, 418
setZoom() method, 434
shake effect, 477
shift() method, 170
shiftKey property (events), 225
show and hide animations, 306
.show() method, 188, 271-272, 305-306, 339, 485
showButtonPanel option (datepicker widget), 526
showErrors() method, 356
showOn option (datepicker widget), 525
.siblings() method, 210
sin() method, 176
size
of mobile web pages, 542
of page elements, 258
size effect, 477
.slice() method, 165, 170, 207
slide effect, 477
slide option (slider widget), 531
.slideDown() method, 312
sliders
slider-based image gallery, 365-370
.slideToggle() method, 312
.slideUp() method, 312
dynamic menu sample project, 314-316
.slideDown() method, 312
.slideToggle() method, 312
.slideUp() method, 312
width and height, 312
social media
Facebook social elements, 425-426
comment fields, 428
Like button, 427
Send button, 428
Twitter controls, 443
Follow button, 445
Tweet button, 444
sort event, 514
sort() method, 170
options, 513
Twitter controls, adding, 443-444
sortactivate event, 514
sortbeforeStop event, 514
sortchange event, 514
sortColumn() function, 373
sortout event, 514
sortover event, 514
sortreceive event, 514
sortremove event, 514
sortstart event, 514
sortstop event, 514
sortupdate event, 514
specialEasing option (.animate() method), 303
splice() method, 170
split() method, 165
split-button lists, 586
splitting strings into arrays, 166
sqrRoot() function, 158
sqrt() method, 176
stack option (draggable widget), 495
statements. See specific statements
status attribute
jqXHR object, 422
XMLHttpRequest object, 399
statusText attribute (jqXHR object), 422
step option
.animate() method, 302
spinner widget, 533
stopImmediatePropagation() method, 227
stopOnFalse flag (callbacks), 251
stopPropagation() method, 227
string data type, 142
converting arrays to, 171
escape codes, 164
replacing words in, 166
searching for substrings, 166
splitting into arrays, 166
Style inspector (Firebug), 47
<style> element, 70
styles. See CSS (Cascading Style Sheets)
submission (forms), 340
submit event, 229
submitting forms, 601
substr() method, 165
substring() method, 165
substrings, searching for, 166
SVC graphics. See scalable vector graphics
switch operator, 147
.switchClass() method, 482
:tabbable() selector, 465
<table> element, 80
tables
adding to mobile web pages, 595-597
generating, 84
interactive tables with sorting and filters, 371-377
<table> element, 80
tag name, finding DOM objects by, 189-190
target property (events), 225
text elements in mobile forms, 601
text styles, applying with CSS, 106-110
text-align property (CSS), 106
<textarea> element, 83
text-decoration property (CSS), 107
text-indent property (CSS), 107
text-overflow property (CSS), 107
text-transform property (CSS), 107
tilt_changed event, 434
timers, 296
delay timers, 296
reoccurring timers, 296
timeStamp property (events), 225
toExponential() method, 163
toFixed() method, 163
toggle switches in mobile forms, 604-608
.toggleClass() method, 271, 482
toggleItem() function, 378-379
tolerance option
droppable widget, 499
selectable widget, 508
sortable widget, 513
toLowerCase() method, 165
.tooltip() method, 535
top property (window object), 287
toPrecision() method, 163
toUpperCase() method, 165
traffic analyzer (Firebug), 59-62
transfer effect, 477
transitions
mobile web page transitions, 562
traversing DOM with jQuery objects, 207-209, 217-220
trigger() method, 246
triggering events manually
try/catch blocks, 157
Tweet button, 444
tweets. See Twitter controls, adding
Twitter controls, adding, 443
Follow button, 445
Tweet button, 444
Twitter JavaScript API library, 443-444
Twitter JavaScript API library, 443-444
twitter-timeline class, 447
twitter-tweet class, 446
type property (events), 225
.ui-dialog-contain class, 572
.ui-progressbar-value class, 529
.ui-selecting class, 508
.ui-sortable-helper class, 513
<ul> element, 79
Uniform Resource Locators. See URLs (Uniform Resource Locators)
unique flag (callbacks), 251
unload event, 229
unshift() method, 170
updateAddr() function, 341
updateEqualizer() function, 386-388
updateImages() function, 454-455
updating server data with AJAX, 415-419
url rule (form validation), 355
URLs (Uniform Resource Locators), 7
using option (.position() method), 467
.validate() method, 352
validating forms, 351
jQuery validation plug-in, 352
simple jQuery validation with HTML, 352-354
validation rules, 354
value attribute
DOM objects, 187
form elements, 84
value option (slider widget), 531
valueOf() method, 163, 165, 170
values
assiging to objects, 162
getting and setting
in jQuery, 257
returning from functions, 154
var keyword, 141
variables
passing to functions, 153
vector graphics. See scalable vector graphics
<video> element, 94
viewport meta tag, 548
visibility
animations
fade animation to implement image selection effect, 311
.fadeIn() method, 309
.fadeOut() method, 309
.fadeTo() method, 310
.fadeToggle() method, 309
visibility jQuery selectors, 193
visibility property (CSS), 122
visibility transitions, 485-487
web browsers. See browsers
web development projects. See projects
web forms. See forms
web servers
development web server, installing, 24-25
overview, 6
server data, updating with AJAX, 415-419
XAAMP stack, installing, 24-25
which property (events), 225
while loops, 150
widget() method, 494
accordian widget, 522
attribute values, 522
jQuery.widget factory, 493-494
mouse interaction widget, 494
options, 521
options, 513
sortable elements, implementing, 515-518
width property (screen object), 286
window object, 285
windows (browser), 7
within option (.position() method), 467
word-spacing property (CSS), 107
writing dynamic scripts, 30-32
XAAMP stack, installing, 24-25
XML/HTML response data, handling, 412-414
XMLHttpRequest object, 399
.zIndex() method, 464
z-index property, 277
CSS (Cascading Style Sheets), 126
draggable widget, 495
sortable widget, 513
zoom attribute (mapObject), 433
zoom_changed event, 434