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

[top]

<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

browser values, 260-266

data outside the web page, 285, 295

browser history object, 289

browser location object, 285

cookies, 291-294

external links, controlling, 290

pop-up boxes, 294-296

screen object, 285-286

timers, 296-299

window object, 285-288

DOM (Document Object Model), 137-141

example, 140-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

sample project, 191-192

with traditional JavaScript, 139

form elements, 326

attributes, 326-327

button inputs, 330

check box inputs, 328

file inputs, 330-331

hidden inputs, 331

radio inputs, 328-329

select inputs, 329-330

text input elements, 327-328

server-side data with AJAX, 406-408

asynchronous communication, 397

compared to page requests, 395-396

cross-domain requests, 397-398

GET requests, 398-399

global event handlers, 419

global setup, 396-419

implementing from JavaScript, 399-401

implementing from jQuery, 401-404

low-level AJAX requests, handling, 420-422

overview, 395

POST requests, 398-399

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

DOM insertion, 560-562

GET requests, 398-399

global event handlers, 419

global setup, 396-419

implementing from JavaScript, 399-401

implementing from jQuery, 401-404

login requests, handling, 405-408

low-level AJAX requests, handling, 420-422

overview, 16-17, 395

POST requests, 398-399

request handling, 397

response data, handling, 405, 408-414

JSON response data, 408-411

XML/HTML response data, handling, 412-414

response data types, 399

simple example, 16-17

updating server data with, 415-419

.ajax() method, 397, 420-421

.ajaxComplete() method, 419

.ajaxError() method, 419

.ajaxSend() method, 419

.ajaxSetup() method, 419

.ajaxStart() method, 419

.ajaxStop() method, 419

.ajaxSuccess() method, 419

alert() method, 287, 295

alsoResize option (resizable widget), 504

altKey property (events), 225

.always() method, 405, 422

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

effects, 488-490

.hide() method, 305

moving elements, 318-322

element position changes on nonstatic elements, 319

element position changes on static elements, 319

paper airplane app, 319-322

overview, 301

.promise() method, 305

resize animations, 316-318

.show() method, 305-306

sliding animation, 312

dynamic menu sample project, 314-316

.slideDown() method, 312

.slideToggle() method, 312

.slideUp() method, 312

width and height, 312

stopping, 302-304

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

configuring, 19-20

installing, 18-19

arithmetic operators, 143

Array object, 166-174

adding/removing items, 171

checking whether array contains an item, 171

combining, 169

converting to strings, 171

iterating through, 169

methods, 169-170

overview, 166-169

sample project, 173-174

arrays, 142, 166

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

.attr() method, 188, 327

attribute jQuery selectors, 193-195

<audio> element, 94

AUTHORIZATION header, 11

autocomplete widget, 523-524

autoHide option (resizable widget), 504

availHeight property (screen object), 285

availWidth property (screen object), 285

axis option

draggable widget, 495

sortable widget, 513

B

[top]

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

block elements, 73-75

blur event, 228

.blur() method, 287, 339

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 model, 122-123

box-shadow property (CSS), 117

break keyword, 152

browser development tools, 21-22

Firebug on Firefox, 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

jQuery UI buttons, 524-525

Like button, 427

in mobile forms, 603

navbars, 567-571

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

C

[top]

calendar input, creating, 525-526

callbacks, 251

callback mechanism, 251-252

deferred objects, 252

cancel option (mouse interaction widget), 494

cancelable property (events), 225

<canvas> element, 91-93

<caption> element, 80-83

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

.changePage() method, 557-558

changeRadio() function, 347, 349

changing classes, 270

charAt() method, 165

charCode property (events), 225

charCodeAt() method, 165

check box inputs, 328, 608

checkStatus() method, 296

childNodes attribute (DOM objects), 187

.children() method, 208

Chrome JavaScript console, 22

class attribute, 73, 187

class name, finding DOM objects by, 189

class transitions, 482-484

classes. See specific classes

className attribute, 260

clearInterval() method, 287, 296

clearTimeout() method, 287, 296

click event, 229

click() method, 187-188

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

<col> element, 80-83

<colgroup> element, 80-83

collapsible blocks and sets, 590-592

collapsible option

accordian widget, 522

tabs widget, 534

collision option (.position() method), 467

color property (CSS), 103-105

colorDepth property (screen object), 285

colspan attribute (table elements), 80

columntogglemode (tables), 596

combining

arrays, 169

strings, 164-166

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

conditional logic, 148-149

configuring

Aptana Studio, 19-20

browser development tools, 21-22

Firebug on Firefox, 21-22

Internet Explorer developer tools, 22-23

JavaScript console in Chrome, 22

jQuery Mobile default settings, 548

confirm() method, 287, 295

confirmation pop-ups, 295

connectTo option (sortable widget), 513

container elements, 75-78

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

objects, 188-189

COOKIE header, 11

cookies, 291-294

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

adding, 27-30

to headers, 99

to HTML body, 99

animating CSS settings, 301-303

applying, 97-98

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

applying, 111-116

backgrounds, 111

borders, 117-121

color, 103-105

cursor, 121

getting and setting, 257-258

opacity, 121-122

text styles, 106-110

visibility, 122

graphical equalizer display, 385-389

layout properties, 122

box model, 122-123

content size, 123

element flow, 124-125

getting and setting, 257-258

laying out web page components with, 127-130

margins, 124

overflow, 126

padding, 123

positioning, 125-126

z-index, 126, 277-282

loading from file, 98

overview, 97

preparing for dynamic design, 130

selectors, 102-104

sparkline graphics, 389-392

syntax, 100-102

css files, 544

CSS inspector (Firebug), 46

.css() method, 188, 258, 277

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 JavaScript, 249-250

in jQuery, 250

custom Google searches, 439-443

custom widgets, 537-538

custom-defined objects

adding methods to, 177-178

defining objects, 177

prototyping object patterns, 178-179

sample project, 180-181

D

[top]

data attributes

mobile web pages, 545

Twitter controls, 444-445

.data() method, 331

data property (events), 225

:data() selector, 465

data types

AJAX response data types, 399

JavaScript, 142-143

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-icon attribute, 546, 600

data-iconpos attribute, 546, 600

data-lang attribute, 444-445

data-mini attribute, 546, 600

data-position attribute, 555-556

data-rel attribute, 546

data-related attribute, 444

data-role attribute, 546, 600

data-show-count attribute, 445

data-show-screen-name attribute, 445

data-size attribute, 444-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 object, 174-175

date rule (form validation), 354

dateFormat option (datepicker widget), 526

dateISO rule (form validation), 354

datepicker widget, 525-526

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

Firebug DOM inspector, 44-45

with Firebug HTML inspector, 40-44

JavaScript, 35-39, 53-59

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)

applying, 111-116

backgrounds, 111

borders, 117-121

color, 103-105

cursor, 121

opacity, 121-122

text styles, 106-110

visibility, 122

destroy() method, 494

.detach() method, 269

development environment

characteristics, 17-18

development web server, 24-25

IDEs, 18-20

dialogs

adding to mobile web pages, 571-576

dialog widget, 527-528

overlay dialogs, 381-385

digits rule (form validation), 354

directory structure, 26-27

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

dividers, 586-587

do/while loops, 150

<!DOCTYPE> element, 66-67

Document Object Model. See DOM (Document Object Model)

DOM (Document Object Model), 6-7

accessing, 137-141

example, 140-141

with jQuery selectors, 139

with traditional JavaScript, 139

editing with Firebug DOM inspector, 44-45

event handlers, 236-241

events

adding in JavaScript, 232-236

assigning in HTML, 231-232

filtering DOM elements in jQuery objects, 206-207

objects

accessing, 189-192, 201-203

attributes, 187

converting to/from jQuery, 188-189

determining whether an object is DOM or jQuery, 188

finding by ID, 189

methods, 187

overview, 185-187

traversing with jQuery objects, 207-209

DOM inspector (Firebug), 44-45

.done() method, 405, 422

downloading

jQuery Mobile library, 543-544

jQuery UI, 459

drag event, 496

drag-and-drop widgets

apply to web pages, 501-503

draggable widget, 495-498

droppable widget, 499-503

draggable widget, 495-498

dragstart event, 496

dragstop event, 496

drop effect, 476

drop event, 500

dropactivate event, 500

dropout event, 500

dropover event, 500

droppable widget, 499-503

dynamic menus, 314-316

dynamic scripts, writing, 30-32

E

[top]

E method, 176

.each() method, 211-217

easing

applying to class transitions, 482-484

easing functions, 477-478

easing option (.animate() method), 303

editing DOM (Document Object Model), 44-45

.effect() method, 478-482

effects, 475

adding

to animations, 488-490

to class transitions, 482-484

to element visibility transitions, 485-487

to jQuery objects, 478-482

easing functions, 477-478

table of, 476-477

element() method, 356

elements. See specific elements

<ellipse> element, 87

email rule (form validation), 354

embedded timelines, 446-447

embedded tweets, 445-446

.empty() method, 269

.end() method, 212

.eq() method, 207

equalizer display, 385-389

equalTo rule (form validation), 354

error event, 228

error handling

finally keyword, 158

throwing errors, 157-158

try/catch blocks, 157

errorPlacement attribute (Validation object), 358

escape codes, 164

event handlers, 136-137, 230-231

adding in JavaScript, 232-236

applying in jQuery, 236-241

assigning in HTML, 231-232

event option (tabs widget), 534

eventPhase property (events), 225

events

browser events, 7

callbacks, 251

callback mechanism, 251-252

deferred objects, 252

custom events, 249

in JavaScript, 249-250

in jQuery, 250

draggable widget, 496

droppable widget, 499

event handlers, 230-231

adding in JavaScript, 232-236

applying in jQuery, 236-241

assigning in HTML, 231-232

event objects, 225-227

event process, 223-224

event types, 227-229

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

sortable widget, 506-512

triggering manually

in JavaScript, 241-245

with jQuery, 246-249

exp() method, 176

explode effect, 476

external links, controlling, 290

F

[top]

Facebook social elements, adding, 425-426

comment fields, 428

Facebook API, 426-427

Like button, 427

sample project, 430-432

Send button, 428

fade animation, 311

fade effect, 476

fade() function, 274

.fadeIn() method, 309

.fadeOut() method, 309

.fadeTo() method, 310

.fadeToggle() method, 309

.fail() method, 405, 422

fb-like class, 427

fb-send class, 428

<fieldset> element, 83

file inputs, 330-331

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

filters in tables, 371-377

finally keyword, 158

.find() method, 209

finding DOM objects

by class name, 189

by ID, 189

sample project, 191-192

by tag name, 189-190

Firebug

CSS inspector, 46

DOM inspector, 44-45

HTML inspector, 40-44

installing, 21-22

JavaScript console, 35-39

JavaScript debugger, 53-59

Layout inspector, 47-52

Style inspector, 47

traffic analyzer, 59-62

fireEvent() method, 243

.first() method, 207

fixed headers/footers, 555-556

Flickr images, adding, 451-456

flip() function, 279, 281

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

sample project, 341-345

focus event, 228

focus() method, 288, 339, 464

: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

footers, fixed, 555-556

for loops, 151, 169

for/in loops, 151-152, 169

form elements, 83-84

form jQuery selectors, 193-198

form() method, 356

<form> element, 83

forms

adding to web pages, 83-86

autocomplete widget, 523-524

flow control, 338

controlling submit and reset, 340

disabling elements, 339

focusing and blurring form elements, 339

hiding and showing elements, 339

sample project, 341-345

form elements, 83-84, 326

animations, 346-351

attributes, 326-327

button inputs, 330

check box inputs, 328

disabling, 339

file inputs, 330-331

focusing and blurring, 339

hidden inputs, 331

hiding and showing, 339

radio inputs, 328-329

sample project, 334-338

select inputs, 329-330

text input elements, 327-328

mobile forms, 599

buttons, 603

data attributes, 599

disabling, 600

labels, 600

radio and check box groups, 608

refreshing, 601

select menus, 610-612

sliders, 604-608

submitting, 601

text elements, 601

toggle switches, 604-608

overview, 325

serializing form data, 332-333

validating, 351

jQuery validation plug-in, 352

manually, 351-352

sample project, 359-363

simple jQuery validation with HTML, 352-354

validation messages, 356-358

validation rules, 354

fromCharCode() method, 165

functions. See also specific functions

defining, 153, 155-156

passing variables to, 153

returning values from, 154

G

[top]

generating tables, 84

geometric shapes, 87

.get() method, 401

GET requests, 11, 398-399

getAllResponseHeaders() method, 422

getAttribute() method, 187

getCenter() method, 434

getCookie() function, 291, 293

getElementById() function, 139, 189

getElementsByClass() method, 189

getElementsByTagName() method, 189-190

.getJSON() method, 401, 451

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 Maps, adding, 432-439

Google search, adding, 439-443

graphical equalizer display, 385-389

graphics. See also animations

adding with <img> element, 78-79

canvas, 91-93

fade animation to implement image selection effect, 311

Flickr images, adding, 451-456

geometric shapes, 87

image gallery, 365-370

paths, 88-91

scalable vector graphics

adding to web pages, 87

<svg> element, 87

sparkline graphics, 389-392

greedy option (droppable widget), 499

grid layout, 581-585

groups_pool feed, 451

H

[top]

handles option (resizable widget), 504

.has() method, 207

hash property (location object), 285

<head> element, 66, 68, 99

header option (accordian widget), 522

headers

fixed headers, 555-556

HTTP headers, 10-11

headers attribute (table elements), 81

height() method, 188, 259

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

adding, 29, 579-580

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

<caption>, 80-83

<col>, 80-83

<colgroup>, 80-83

components of, 67

container elements, 75-78

defining CSS styles in, 99-100

<!DOCTYPE>, 66-67

<fieldset>, 83

<form>, 83

<head>, 66, 68, 99

<img>, 78-79

<input>, 83

<label>, 83

<legend>, 83

<li>, 79

<link>, 72

<meta>, 69-70

<noscript>, 71-72

<ol>, 79

<option>, 83

<script>, 70-71, 136

<select>, 83

<style>, 70

<table>, 80

<tbody>, 80-83

<td>, 80-83

<textarea>, 83

<tfoot>, 80-83

<th>, 80-83

<thead>, 80-83

<title>, 68-69

<tr>, 80-83

<ul>, 79

event handers, assigning, 231-232

overview, 8, 65-66

structure, 66-68

XML/HTML response data, handling, 412-414

.html() method, 188, 267, 269

HTML5, 8

<canvas>, 91-93

<ellipse>, 87

<path>, 88-91

<polygon>, 87

<svg>, 87

<video>, 94

HTTP (Hypertext Transfer Protocol)

GET requests, 11

headers, 10-11

overview, 10

POST requests, 11

Hypertext Markup Language. See HTML (Hypertext Markup Language)

Hypertext Transfer Protocol. See HTTP (Hypertext Transfer Protocol)

I

[top]

id attribute, 73, 187

IDEs, installing, 18-20

IDs

finding DOM objects by, 189

unique IDs, 463-464

if operator, 146

image elements, 78-79

image gallery, 365-370

images. See graphics

images folder, 544

<img> element, 78-79

inc() function, 529

indexOf() method, 165-166, 170-171

initialization

jQuery initialization code, 230

page load events, 229-230

inline elements, 73-75

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

Aptana Studio, 18-19

development web server, 24-25

Firebug, 21-22

IDEs, 18-20

XAAMP stack, 24-25

instances of objects, creating, 161

interactive tables with sorting and filters, 371-377

interation widgets. See widgets

Internet Explorer developer tools, 22-23

interrupting loops, 152-153

.is() method, 212, 328

isDefaultPrevented() method, 227

isImmediatePropagationStopped() method, 227

isNaN() function, 163

isPropagationStopped() method, 227

items option

sortable widget, 513

tooltips widget, 535

iterating through arrays, 169

J

[top]

JavaScript

accessing DOM with, 137-141

adding to web pages, 136-138

browser values, accessing, 260-266

cookies, 291-294

data types, 142-143

debugging

with JavaScript console, 35-39

with JavaScript debugger, 53-59

overview, 35

development environment

browser development tools, 21-22

characteristics, 17-18

development web server, 24-25

IDEs, 18-20

error handling

error handlers, 232-236

finally keyword, 158

throwing errors, 157-158

try/catch blocks, 157

events

custom events, 249-250

event objects, 225-227

event process, 223-224

event types, 227-229

triggering manually, 241-245

executing with event handlers, 136-137

external links, controlling, 290

forms. See forms

functions

defining, 153, 155-156

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

loops, 149-150

do/while loops, 150

for loops, 151, 169

for/in loops, 151-152, 169

interrupting, 152-153

while loops, 150

methods. See individual methods

objects. See objects

operators, 143

arithmetic operators, 143

assignment operators, 144

comparison operators, 145-149

conditional logic, 148-149

overlay dialogs, 381-385

overview, 14

page elements

accessing, 262-266

adding, 267

class name, 260

classes, changing, 270

CSS properties, 257-258

manipulating dynamically, 273-276

mouse position, 255-256

position, 259-260

rearranging dynamically, 277-282

removing, 268-269

size, 258

values, 256-257

visibility, 271-272

page load events for initialization, 229-230

pop-ups, 294-296

confirmation pop-ups, 295

notification pop-ups, 295

prompts, 295-296

simple example, 14

sparkline graphics, 389-392

timers, 296

delay timers, 296

reoccurring timers, 296

sample project, 298-299

tree views, 377-381

Twitter JavaScript API library, 443-444

variables

creating, 141-142

passing to functions, 153

scope, 156-157

JavaScript console (Chrome), 22

JavaScript debugger (Firebug), 53-59

join() method, 170, 171

jQuery. See also jQuery Mobile; jQuery UI

accessing DOM with, 137-141

adding to web pages, 136-138

animations

animation queues, 302

CSS settings, animating, 301-303

delaying, 304

moving elements, 318-322

overview, 301

.promise() method, 305

resize animations, 316-318

show and hide animations, 305-308

sliding animation, 312-316

stopping, 302-304

browser values, accessing, 260-266

debugging, 35, 55

development environment

browser development tools, 21-22

characteristics, 17-18

development web server, 24-25

IDEs, 18-20

event handlers, applying, 236-241

events

custom events, 250

event objects, 225-227

event process, 223-224

event types, 227-229

triggering manually, 246-249

forms. See forms

graphical equalizer display, 385-389

image gallery, 365-370

implementing AJAX from, 401-404

initialization code, 230

interactive tables with sorting and filters, 371-377

loading, 135-136

methods. See individual methods

objects, 213-217

adding effects to, 478-482

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

overview, 186-188

traversing DOM with, 207-209, 217-220

overlay dialogs, 381-385

overview, 14

page elements

accessing, 262-266

adding, 267-268

class name, 260

classes, changing, 270

CSS properties, 257-258

inserting, 270

manipulating dynamically, 273-276

mouse position, 255-256

position, 259-260

rearranging dynamically, 277-282

removing, 268-269

replacing, 269-270

size, 258

values, 257

visibility, 271-272

selectors

attribute selectors, 194-195

basic selectors, 193-194

content selectors, 195-196

filtered selectors, 198-199

form selectors, 197-198

hierarchy selectors, 196

overview, 193

sample project, 201-203

visibility selectors, 198

sparkline graphics, 389-392

tree views, 377-381

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

select menus, 610-612

sliders, 604-608

submitting, 601

text elements, 601

toggle switches, 604-608

mobile web pages, 553

basic HTML, adding, 579-580

building, 549-551, 564-567

bypassing AJAX, 562

challenges of, 541-542

changing with jQuery code, 557-559

collapsible blocks and sets, 590-592

dialogs, 571-576

fixed headers/footers, 555-556

grid layout, 581-585

linking, 559-562

listviews, 585-590

navbars, 567-571

navigation buttons, 556-557

page anatomy, 553-554

page transitions, 562

panels, 592

pop-ups, 594

size, 542

tables, 595-597

ThemeRoller, 544

viewport meta tag, 548

jQuery UI

adding to projects, 461-463

buttons, 524-525

downloading, 459

effects, 475

adding to animations, 488-490

adding to class transitions, 482-484

adding to element visibility transitions, 485-487

adding to jQuery objects, 478-482

easing functions, 477-478

table of, 476-477

methods. See individual methods

overview, 459

positioning elements with, 468-472

selectors

:data(), 465

:focusable(), 465

:tabbable(), 465

applying, 467-468

ThemeRoller, 460-461

unique IDs, 463-464

widgets, 493, 521

accordian widget, 522

attribute values, 522

autocomplete widget, 523-524

custom widgets, 537-538

datepicker widget, 525-526

dialog widget, 527-528

draggable widget, 495-498

droppable widget, 499-503

jQuery.widget factory, 493-494

menu widget, 528-529

methods and events, 493-494

mouse interaction widget, 494

options, 521-522

progress bar widget, 529-530

resizable widget, 503-507

selectable widget, 508-512

slider widget, 530-532

sortable widget, 512-518

spinner widget, 532-533

tabs widget, 533-535

tooltips widget, 535-537

jQuery.widget factory, 493-494

jqXHR object, 421-422

js files, 544

JSON response data, handling, 408-411

JSONP (JSON with Padding), 398

K

[top]

keydown event, 228

keypress event, 228, 352

keyup event, 228

keywords. See specific keywords

L

[top]

<label> element, 83

labels, 600

.last() method, 207

lastIndexOf() method, 165, 170

Layout inspector (Firebug), 47-52

layout properties, 122

box model, 122-123

content size, 123

element flow, 124-125

laying out web page components with, 127-130

margins, 124

overflow, 126

padding, 123

positioning, 125-126

z-index, 126, 277-282

layouts, grid, 581-585

<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

lists, 585-590

adding to mobile web pages, 588-590

adding to web pages, 79

basic lists, 585

dividers, 586-587

list elements, 79

nested lists, 586

searchable lists, 587

split-button lists, 586

LN10() method, 176

load event, 228

.load() method, 230, 401

loading

CSS styles, 98

jQuery library, 135-136

.loadPage() method, 557

local hash, 559-556

location object, 285

login requests, handling with AJAX, 405-408

loops, 149-150

do/while loops, 150

for loops, 151, 169

for/in loops, 151-152, 169

interrupting, 152-153

while loops, 150

low-level AJAX requests, handling, 420-422

M

[top]

manually validating forms, 351-352

Map() function, 433-434

.map() method, 212-217

Map object, 434

mapOptions object, 433-434

Maps (Google), adding, 432-439

mapTypeId attribute (mapOptions), 433

maptypeid_changed event, 434

margins, adding with CSS, 124

match() method, 165

Math object, 175-176

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

menu widget, 528-529

menus

dynamic menus, 314-316

menu widget, 528-529

in mobile forms, 610-612

messages, validation, 356-358

<meta> element, 69-70

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

select menus, 610-612

sliders, 604-608

submitting, 601

text elements, 601

toggle switches, 604-608

mobile web pages. See also jQuery Mobile; mobile forms

basic HTML, adding, 579-580

building, 549-551, 564-567

bypassing AJAX, 562

challenges of, 541-542

changing with jQuery code, 557-559

collapsible blocks and sets, 590-592

dialogs, 571-576

fixed headers/footers, 555-556

grid layout, 581-585

linking, 559-562

listviews, 585-590

adding, 588-590

basic lists, 585

dividers, 586-587

nested lists, 586

searchable lists, 587

split-button lists, 586

navbars, 567-571

navigation buttons, 556-557

back button, 557

creating, 556

positioning, 557

overview, 541, 553

page anatomy, 553-554

page transitions, 562

panels, 592

pop-ups, 594

size, 542

tables, 595-597

mobileinit handler, 548, 611

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

move() function, 278, 281

moveBy() method, 288

moveTo() method, 92, 288

moving elements, 318-322

element position changes on nonstatic elements, 319

element position changes on static elements, 319

paper airplane app, 319-322

my option (.position() method), 469

N

[top]

name attribute

form elements, 84

window object, 287

naming files, 27

navbars, 567-571

navigation buttons, 556-557

back button, 557

creating, 556

positioning, 557

nested lists, 586

network traffic analysis, 59-62

.next() method, 209

.nextAll() method, 209

.nextUntil() method, 209

<noscript> element, 71-72

.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

O

[top]

objects, 143

Array, 166-174

adding/removing items, 171

checking whether array contains an item, 171

combining, 169

converting to strings, 171

iterating through, 169

methods, 169-170

overview, 166-169

sample project, 173-174

browser

history object, 289

location object, 285

converting type of, 188-189

creating

instances, 161

JavaScript objects, 177, 180-181

Date, 174-175

deferred objects, 252

determining type of, 188

DOM objects

accessing, 189-192, 201-203

attributes, 187

finding by ID, 189

methods, 187

overview, 185-187

event objects, 225-227

jQuery objects

adding effects to, 478-482

chaining jQuery object operations, 205-206

manipulating DOM elements with, 213-217

methods, 188, 207, 209, 213-217

overview, 186-188

traversing DOM with, 206-209, 217-220

jqXHR, 421-422

Map, 434

mapOptions, 433-434

Math, 175-176

methods, 162

adding, 177-178

assigning, 162

Number, 163

overview, 161

properties, 162

prototyping object patterns, 178-179

RegExp, 175

screen, 285-286

String, 164-166

combining, 164-166

converting arrays to, 171

escape codes, 164

methods, 164-165

replacing words in, 166

sample project, 167-166

searching for substrings, 166

splitting into arrays, 166

Validator, 356-357

window, 285

methods, 285-288

properties, 285-287

XMLHttpRequest, 399

of option (.position() method), 469

off() method, 236-237

.offsetParent() method, 209

<ol> element, 79

on() method, 236-237

once flag (callbacks), 251

onload event, 229-230

onreadystatechange event handler, 400

onSelect option (datepicker widget), 525

opacity property

CSS (Cascading Style Sheets), 121-122

draggable widget, 495

sortable widget, 513

open() method, 288, 400

opener property (window object), 286

operators, 143

arithmetic operators, 143

assignment operators, 144

comparison operators

if, 146

switch, 147

table of, 145

conditional logic, 148-149

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

overlay dialogs, 381-385

P

[top]

padding, applying with CSS, 123

page elements. See also HTML (Hypertext Markup Language)

accessing, 262-266

adding

in JavaScript, 267

in jQuery, 267-268

classes, changing, 271

className attribute, 260

collapsible elements, 590-592

CSS properties, setting, 257-258

element flow, 124-125

element visibility transitions, 485-487

graphical equalizer display, 385-389

image gallery, 365-370

inserting, 270

manipulating dynamically, 273-276

mouse position, getting, 255-256

overlay dialogs, 381-385

position

getting and setting, 258-260

positioning with jQuery UI, 468-472

rearranging dynamically, 277-282

removing, 268-269

replacing, 269-270

resizing, 258, 503-507

sparkline graphics, 389-392

tables

adding to mobile web pages, 595-597

adding to web pages, 79-83

generating, 84

interactive tables with sorting and filters, 371-377

tree views, 377-381

values

getting/setting in JavaScript, 256-257

getting/setting in jQuery, 257

visibility, 271-272

page requests, 395-396

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

paper airplane app, 319-322

.parent() method, 209

parent property (window object), 287

parentNode attribute (DOM objects), 187

.parents() method, 210

.parentsUntil() method, 210

passing variables to functions, 153

<path> element, 88-91

pathname property (location object), 285

paths, 88-91

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

pop-ups, 294-296, 594

confirmation pop-ups, 295

notification pop-ups, 295

prompts, 295-296

port property (location object), 285

.position() method, 258, 468

position option (tooltips widget), 536

positioning

HTML elements from CSS, 125-126

navigation buttons, 557

page elements, 258-260, 468-472

.post() method, 401

POST requests, 11, 398-399

pow() method, 176

.prev() method, 210

.prevAll() method, 210

.preventDefault() method, 227, 340

.prevUntil() method, 210

print() method, 288

progress bar widget, 529-530

projects

creating, 28

CSS (Cascading Style Sheets), adding, 27-30

directory structure, 26-27

dynamic scripts, writing, 30-32

file naming, 27

.promise() method, 305

prompt() method, 288, 295-296

prompts, 295-296

.prop() method, 327

properties (CSS)

design properties

applying, 111-116

backgrounds, 111

borders, 117-121

color, 103-105

cursor, 121

opacity, 121-122

text styles, 106-110

visibility, 122

getting and setting, 257-258

layout properties, 122

box model, 122-123

content size, 123

element flow, 124-125

margins, 124

overflow, 126

padding, 123

positioning, 125-126

z-index, 126

z-index, 277-282

properties (object)

accessing, 162

location object, 285

screen object, 285-286

window object, 285-287

protocol property (location object), 285

prototyping object patterns, 178-179

puff effect, 476

pulsate effect, 476

push() method, 170

Q

[top]

querySelectorAll() method, 207

queue option (.animate() method), 303

queues, animation, 302

R

[top]

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

page elements, 268-269

unique IDs, 463-464

renderSpark() function, 390

reoccurring timers, 296

replace() method, 165-166, 285

.replaceAll() method, 270

.replaceWith() method, 270

replacing

page elements, 269-270

words in strings, 166

requests

cross-domain requests, 397-398

GET requests, 11, 398-399

login requests, 405-408

low-level AJAX requests, 420-422

POST requests, 11, 398-399

request handling (AJAX), 397

sending from jQuery, 402-404

required rule (form validation), 355

reset event, 228, 340

.reset() method, 340

resetForm() method, 356

resizable elements, 506-507

resizable widget, 503-507

resize animations, 316-318

resize event, 229, 504

resize() function, 278, 281

resizeBy() method, 288

resizestart event, 505

resizestop event, 505

resizeTo() method, 288

resizing elements, 503-507

.resolve() method, 252

response attribute (XMLHttpRequest object), 400

response data, handling

AJAX, 405, 408-414

JSON response data, 408-411

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

S

[top]

scalable vector graphics

adding to web pages, 87

canvas, 91-93

geometric shapes, 87

paths, 88-91

scale effect, 477

scope of variables, 156-157

screen object, 285-286

screenX property

events, 225

window object, 287

screenY property

events, 225

window object, 287

<script> element, 70-71, 136

scripts

client-side scripts, 14

debugging

CSS (Cascading Style Sheets), 46-52

HTML elements, 40-45

JavaScript, 53-59

with JavaScript console, 35-39

jQuery, 59

network traffic analysis, 59-62

overview, 35

dynamic scripts, writing, 30-32

overview, 12

server-side scripts, 12-13

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 inputs, 329-330

select menus in mobile forms, 610-612

<select> element, 83

selectable sets, 510-512

selectable widget, 508-512

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

applying, 467-468

attribute selectors, 194-195

basic selectors, 193-194

content selectors, 195-196

filtered selectors, 198-199

form selectors, 197-198

hierarchy selectors, 196

overview, 193

sample project, 201-203

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

GET requests, 398-399

global event handlers, 419

global setup, 396-419

from JavaScript, 399-401

from jQuery, 401-404

login requests, handling, 405-408

low-level AJAX requests, handling, 420-422

overview, 395

POST requests, 398-399

request handling, 397

response data, handling, 405, 408-414

JSON response data, 408-411

XML/HTML response data, handling, 412-414

response data types, 399

server data, updating, 416-419

server-side scripts, 12-13

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

in mobile forms, 604-608

slider bars, 530-532

slider widget, 530-532

slider-based image gallery, 365-370

.slideToggle() method, 312

.slideUp() method, 312

sliding animation, 312-316

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

Facebook API, 426-427

Like button, 427

sample project, 430-432

Send button, 428

Flickr images, 451-456

Google Maps, 432-439

Google search, 439-443

Twitter controls, 443

embedded timelines, 446-447

embedded tweets, 445-446

Follow button, 445

sample project, 449-451

Tweet button, 444

sort event, 514

sort() method, 170

sortable elements, 515-518

sortable widget, 512-518

events, 506-512

options, 513

sortable elements, 515-518

Twitter controls, adding, 443-444

sortactivate event, 514

sortbeforeStop event, 514

sortchange event, 514

sortColumn() function, 373

sorting in tables, 371-377

sortout event, 514

sortover event, 514

sortreceive event, 514

sortremove event, 514

sortstart event, 514

sortstop event, 514

sortupdate event, 514

sparkline graphics, 389-392

specialEasing option (.animate() method), 303

spinner widget, 532-533

spinners, 532-533

splice() method, 170

split() method, 165

split-button lists, 586

splitting strings into arrays, 166

sqrRoot() function, 158

sqrt() method, 176

stack() function, 279, 281

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

.stop() method, 302-304

stopImmediatePropagation() method, 227

stopOnFalse flag (callbacks), 251

stopping animations, 302-304

stopPropagation() method, 227

string data type, 142

String object, 164-166

combining, 164-166

converting arrays to, 171

escape codes, 164

methods, 164-165

replacing words in, 166

sample project, 166-167

searching for substrings, 166

splitting into arrays, 166

style attribute, 73, 187

Style inspector (Firebug), 47

<style> element, 70

styles. See CSS (Cascading Style Sheets)

stylized dialogs, 527-528

stylized menus, 528-529

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

T

[top]

:tabbable() selector, 465

tabbed panels, 533-535

table elements, 79-83

<table> element, 80

tables

adding to mobile web pages, 595-597

adding to web pages, 79-83

generating, 84

interactive tables with sorting and filters, 371-377

<table> element, 80

tabs widget, 533-535

tag name, finding DOM objects by, 189-190

target property (events), 225

<tbody> element, 80-83

<td> element, 80-83

text elements in mobile forms, 601

text input elements, 327-328

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

<tfoot> element, 80-83

<th> element, 80-83

<thead>, 80-83

ThemeRoller, 460-461, 544

throw statement, 157-158

throwing errors, 157-158

tile() function, 279, 281

tilt_changed event, 434

timelines, embedded, 446-447

timers, 296

delay timers, 296

reoccurring timers, 296

sample project, 298-299

timeStamp property (events), 225

<title> element, 68-69

toExponential() method, 163

toFixed() method, 163

.toggle() method, 306, 485

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

tooltips widget, 535-537

top property (window object), 287

toPrecision() method, 163

toString() method, 163, 170

toUpperCase() method, 165

<tr> elements, 80-83

traffic analyzer (Firebug), 59-62

transfer effect, 477

transitions

class transitions, 482-484

mobile web page transitions, 562

traversing DOM with jQuery objects, 207-209, 217-220

tree views, 377-381

trigger() method, 246

triggering events manually

in JavaScript, 241-245

with jQuery, 246-249

try/catch blocks, 157

Tweet button, 444

tweets. See Twitter controls, adding

Twitter controls, adding, 443

embedded timelines, 446-447

embedded tweets, 445-446

Follow button, 445

sample project, 449-451

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

U

[top]

.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

unique IDs, 463-464

.uniqueId() method, 463-464

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

V

[top]

.val() method, 185, 327

.validate() method, 352

validating forms, 351

jQuery validation plug-in, 352

manually, 351-352

sample project, 359-363

simple jQuery validation with HTML, 352-354

validation messages, 356-358

validation rules, 354

Validator object, 356-357

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 JavaScript, 256-257

in jQuery, 257

returning from functions, 154

var keyword, 141

variables

creating, 141-142

passing to functions, 153

scope, 156-157

vector graphics. See scalable vector graphics

<video> element, 94

viewport meta tag, 548

views, tree, 377-381

visibility

animations

fade animation to implement image selection effect, 311

.fadeIn() method, 309

.fadeOut() method, 309

.fadeTo() method, 310

.fadeToggle() method, 309

toggling, 271-272

visibility jQuery selectors, 193

visibility property (CSS), 122

visibility transitions, 485-487

W

[top]

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

widgets, 493, 521

accordian widget, 522

attribute values, 522

autocomplete widget, 523-524

custom widgets, 537-538

datepicker widget, 525-526

dialog widget, 527-528

draggable widget, 495-498

droppable widget, 499-503

jQuery.widget factory, 493-494

menu widget, 528-529

methods and events, 493-494

mouse interaction widget, 494

options, 521

progress bar widget, 529-530

resizable widget, 503-507

selectable widget, 508-512

slider widget, 530-532

sortable widget, 512-518

events, 506-512

options, 513

sortable elements, implementing, 515-518

spinner widget, 532-533

tabs widget, 533-535

tooltips widget, 535-537

width() method, 188, 259

width property (screen object), 286

window object, 285

methods, 285-288

properties, 285-287

windows (browser), 7

within option (.position() method), 467

word-spacing property (CSS), 107

writing dynamic scripts, 30-32

X-Y-Z

[top]

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