jQuery in Action -(Ingles)
486 pág.

jQuery in Action -(Ingles)


DisciplinaProgrmação I28 materiais60 seguidores
Pré-visualização50 páginas
M A N N I N G
Bear Bibeault
Yehuda Katz
IN ACTION
SECOND EDITION
Covers jQuery 1.4 and jQuery UI 1.8
Praise for the First Edition
This is an excellent work, a worthy successor to others in Manning\u2019s \u201cIn Action\u201d series. It is 
highly readable and chock-full of working code. The Lab pages are a marvelous way to explore 
the library, which should become an important part of every web developer\u2019s arsenal. Five stars 
all \u2018round!
\u2014David Sills, JavaLobby, Dzone
I highly recommend the book for learning the fundamentals of jQuery and then serving as a good 
reference book as you leverage the power of jQuery more and more in your daily development.
\u2014David Hayden, MVP C#, Codebetter.com
The Elements of Style for JavaScript.
\u2014Joshua Heyer, Trane Inc.
For those new to jQuery, this book is a good primer that covers a range of common uses of the 
framework.... The examples throughout the book are relevant, and make the point effectively. 
The code snippets are easily distinguishable from the rest of the text, and the text is clear and 
easy to follow.
\u2014Grant Palin, Blogger
It works and makes for a very readable book that you can just breeze through very quickly and 
pick up and retain a lot of information.
\u2014Rich Strahl, Blogger
Thanks to the authors Bear Bibeault and Yehuda Katz and their exemplary style, this compre-
hensive book, or operating manual as it might be called, can be taken in a front-to-back approach 
to learn from scratch, or as a reference to those already dabbling in jQuery and needing verifica-
tion of best practices.
\u2014Matthew McCullough,
\u2014Denver Open Source Users Group
With its capable technical coverage, extensive use of sample code, and approachable style, 
jQuery in Action is a valuable resource for any Web developer seeking to maximize the power 
of JavaScript, and a must-have for anyone interested in learning jQuery.
\u2014Michael J. Ross,
\u2014Web Developer, Slashdot Contributor
More Praise for the First Edition
An 8 out of 10\u2014buy it! If you want to learn jQuery then this is an excellent book...
\u2014John Whish, Founder,
\u2014Adobe ColdFusion User Group for Devon
I highly recommend this book to any novice or advanced JavaScript developers who finally want 
to get serious about JavaScript and start writing optimized and elegant code without all the 
hassle of traditional JavaScript code authoring.
\u2014Val\u2019s Blog
jQuery in Action offers a rich investigation of the up-and-coming jQuery library for client-side 
JavaScript.
\u2014www.DZone.com
I think that jQuery in Action is an excellent book that will help you learn and understand 
jQuery. I certainly enjoyed reading the book.
\u2014Gunnar Hillert,
\u2014Atlanta Java User Group
jQuery in Action
Second Edition
BEAR BIBEAULT
YEHUDA KATZ
MANN I NG
Greenwich
(74° w. long.)
For online information and ordering of this and other Manning books, please visit
www.manning.com. The publisher offers discounts on this book when ordered in quantity. 
For more information, please contact
Special Sales Department
Manning Publications Co.
180 Broad St. 
Suite 1323
Stamford, CT 06901
Email: orders@manning.com
©2010 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in 
any form or by means electronic, mechanical, photocopying, or otherwise, without prior written 
permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are 
claimed as trademarks. Where those designations appear in the book, and Manning 
Publications was aware of a trademark claim, the designations have been printed in initial caps 
or all caps.
Recognizing the importance of preserving what has been written, it is Manning\u2019s policy to have 
the books we publish printed on acid-free paper, and we exert our best efforts to that end. 
Recognizing also our responsibility to conserve the resources of our planet, Manning books
are printed on paper that is at least 15 percent recycled and processed without the use of 
elemental chlorine.
Manning Publications Co. Development editor: Lianna Wlasiuk
180 Broad St. Copyeditor: Andy Carroll
Suite 1323 Typesetter: Dottie Marsico
Stamford, CT 06901 Cover designer: Marija Tudor
ISBN 978-1-935182-32-0
Printed in the United States of America
1 2 3 4 5 6 7 8 9 10 \u2013 MAL \u2013 15 14 13 12 11 10
brief contents
PART 1 CORE JQUERY.............................................................. 1
1 \u25a0 Introducing jQuery 3
2 \u25a0 Selecting the elements upon which to act 18
3 \u25a0 Bringing pages to life with jQuery 55
4 \u25a0 Events are where it happens! 93
5 \u25a0 Energizing pages with animations and effects 138
6 \u25a0 Beyond the DOM with jQuery utility functions 169
7 \u25a0 Expand your reach by extending jQuery 204
v
8 \u25a0 Talk to the server with Ajax 235
PART 2 JQUERY UI .............................................................. 279
9 \u25a0 Introducing jQuery UI: themes and effects 281
10 \u25a0 jQuery UI mouse interactions: Follow that mouse! 305
11 \u25a0 jQuery UI widgets: Beyond HTML controls 346
appendix \u25a0 JavaScript that you need to know but might not! 415
contents
list of lab pages xiii
foreword to the first edition xv
preface to the second edition xvii
preface to the first edition xix
acknowledgments xxii
about this book xxv
about the authors xxx
about the cover illustration xxxii
PART 1 CORE JQUERY .................................................. 1
vii
1 Introducing jQuery 31.1 Power in the economy of code 4
1.2 Unobtrusive JavaScript 6
Separating behavior from structure 6 \u25a0 Segregating the script 7
1.3 jQuery fundamentals 8
The jQuery wrapper 8 \u25a0 Utility functions 11 \u25a0 The document 
ready handler 11 \u25a0 Making DOM elements 13 \u25a0 Extending 
jQuery 14 \u25a0 Using jQuery with other libraries 16
1.4 Summary 16
viii CONTENTS
2 Selecting the elements upon which to act 182.1 Selecting elements for manipulation 19
Controlling the context 20 \u25a0 Using basic CSS selectors 22
Using child, container, and attribute selectors 23 \u25a0 Selecting by 
position 27 \u25a0 Using CSS and custom jQuery filter selectors 29
2.2 Generating new HTML 32
2.3 Managing the wrapped element set 35
Determining the size of a wrapped set 37 \u25a0 Obtaining elements from a 
wrapped set 37 \u25a0 Slicing and dicing a wrapped element 
set 41 \u25a0 Getting wrapped sets using relationships 49 \u25a0 Even more 
ways to use a wrapped set 51 \u25a0 Managing jQuery chains 52
2.4 Summary 54
3 Bringing pages to life with jQuery 553.1 Working with element properties and attributes 56
Manipulating element properties 58 \u25a0 Fetching attribute 
values 58 \u25a0 Setting attribute values 60 \u25a0 Removing 
attributes 62 \u25a0 Fun with attributes 62 \u25a0 Storing custom data on 
elements 64
3.2 Changing element styling 65
Adding and removing class names 66 \u25a0 Getting and 
setting styles 70
3.3 Setting element content 77
Replacing HTML or text content 77 \u25a0 Moving and copying 
elements 78 \u25a0 Wrapping and unwrapping elements 84
Removing elements 86 \u25a0 Cloning elements 87 \u25a0 Replacing 
elements 88
3.4 Dealing with form element values 89
3.5 Summary 92
4 Events are where it happens! 934.1 Understanding the browser event models 95
The DOM Level 0 Event Model 95 \u25a0 The DOM Level 2 Event 
Model 101 \u25a0 The Internet Explorer Event Model 106
4.2 The jQuery Event Model 106
Binding event handlers with jQuery 107 \u25a0 Removing event 
handlers 111 \u25a0 Inspecting the Event instance 112 \u25a0 Proactively 
managing event handlers 115 \u25a0 Triggering event handlers 117
Other event-related methods 119
ixCONTENTS
4.3 Putting events (and more) to work 124
Filtering large data sets 124 \u25a0 Element creation by template 
replication 126 \u25a0 Setting up the mainline markup 129
Adding new filters 130 \u25a0 Adding the qualifying controls 133
Removing unwanted filters and other tasks 134 \u25a0 There\u2019s always 
room
Leandro
Leandro fez um comentário
Posso utilizar em aplicação web?
0 aprovações
Carregar mais