jQuery, jQuery UI, and jQuery Mobile : Recipes and Examples (Developer's Library)

jQuery, jQuery UI, and jQuery Mobile : Recipes and Examples (Developer's Library)

  • ただいまウェブストアではご注文を受け付けておりません。 ⇒古書を探す
  • 製本 Paperback:紙装版/ペーパーバック版/ページ数 371 p.
  • 言語 ENG
  • 商品コード 9780321822086
  • DDC分類 006.76

Full Description


100+ Practical jQuery Recipes for Solving Your Real-World Web and Mobile Development Challenges!jQuery makes it easier than ever for developers to build exceptionally robust, cross-platform websites and mobile apps. jQuery, jQuery UI, and jQuery Mobile: Recipes and Examples is a practical "cookbook," packed with realistic, easy-to-use solutions for making the most of jQuery Core, jQuery UI, plugins, and jQuery Mobile.This guide brings together more than one hundred self-contained, downloadable examples, each with an in-depth explanation of how the code works and how to adapt it for your own needs. Pioneering web/mobile developers Adriaan de Jonge and Phil Dutson present examples you can apply immediately in virtually any web or mobile app, and with any server-side platform, including PHP, .NET, Java, Ruby, Node.js, or Python. This extremely useful guide will help you Test browser support and provide for graceful degradation Fine-tune DOM element selection and manipulate your site's DOM structure Master the newest techniques for event handling and binding Communicate with web servers: AJAX, page errors, redirects, XML, and more Use advanced UI widgets, from accordions and autocomplete to sliders and tabs Build mobile-optimized sites with the jQuery Mobile library Write and smoothly incorporate new plugins Integrate powerful third-party plugins, such as the Twitter Bootstrap framework The authors' proven "code first, explain later" approach supports developers at all levels who want to start experimenting immediately. Their exceptionally readable examples never take shortcuts or compromise quality,and their detailed walk-throughs are ideal for anyone who wants to thoroughly understand their code. If you have a working knowledge of HTML, CSS, and basic JavaScript, you'll feel right at home immediately; if not, de Jonge and Dutson's careful explanations and full HTML page layout examples will get you up to speed quickly.Covers jQuery 1.6.4 and 1.7, with Tips for 1.8

Contents

Preface xixAcknowledgments xxiiiAbout the Author xxvPart I: Core 1Chapter 1: Getting Started with jQuery 3Recipe: Introducing the Basic Usage of jQuery 3 Recipe: Using jQuery with Other Libraries 6Recipe: Determining the jQuery Version 7Recipe: Iterating Arrays with each() 8Recipe: Manipulating Arrays by Using map() 9Recipe: Working with Arrays of Elements 10Recipe: Getting the Position of an Element by Using index() 12Recipe: Finding Elements in an Array by Using grep() 13Recipe: Determining the Size of an Element Set by Using length() 14Recipe: Retrieving HTML5 data- Attributes 15Recipe: Storing Element Data by Using data() 16Recipe: Removing Element Data by Using removeData() 18Recipe: Testing and Manipulating Variables 19Recipe: Extending Objects by Using extend() 22Recipe: Serializing the Data in a Form 24Recipe: Testing Browsers for Feature Support 25Summary 26Chapter 2: Selecting Elements 27Recipe: Combining Two Element Sets by Using add() 27Recipe: Refining the Selection by Using filter() 28Recipe: Selecting Descendants by Using find() and children() 29Recipe: Selecting Elements by Usinghas() and Testing by Using is() 31Recipe: Selecting Form Elements byUsing Pseudo-Selectors 32Recipe: Nesting Selectors 33Recipe: Emulating a CSS Hover Selector 34Recipe: Selecting on Text by Using contains() 35Example: Highlighting a Single Word 36Recipe: Creating Custom Selectors 37Recipe: Scoping the Selection Context 39Summary 40Chapter 3: Modifying the Page 41Recipe: Adding Classes 41 Example: Removing Classes 42Recipe: Generating Class Names 43Recipe: Changing Properties and Attributes 45Recipe: Changing the HTML Contained within an Element 46Recipe: Adding Content by Using append() and appendTo() 48Example: Appending the Outcome of a Function 49Recipe: Adding Content by Using prepend() and prependTo() 50Recipe: Generating HTML Dynamicallyby Using jQuery 51Recipe: Attaching and Detaching Elements 53Recipe: Copying Elements by Using clone() 54Recipe: Inserting Elements at Specific Positions 56Example: Moving Items Up and Down the List 58Recipe: Removing Elements 60Recipe: Wrapping and Unwrapping Elements 61Summary 64Chapter 4: Listening and Responding to Events 65Recipe: Listening to Mouse Events 65 Example: Drawing on a Canvas 67Recipe: Listening to Keyboard Events 69Recipe: Listening to Form Events 70Recipe: Listening to Scroll Events 72Recipe: Adding Central Event Listeners by Using live() and die() 73Recipe: Delegating Events to Specific Ancestor Elements by Using delegate() 75Recipe: Changing the Execution Context of a Function by Using proxy() 78Summary 80Chapter 5: Communicating with the Server 81Recipe: Setting Up an Example Server in Node.js 81 Recipe: Performing a GET Request 83Recipe: Loading HTML Directly 85Recipe: Handling the Result by Using Promises 86Recipe: Handling Server Errors 87Recipe: Catching Page-not-Found Results 89Recipe: Handling Page Redirects 90Recipe: Setting Request Timeouts 91Recipe: Passing HTTP Headers 93Example: Validating Form Input on the Server Side 94Recipe: Loading XML 96Recipe: Listening to AJAX Events 97Recipe: Reading JSONP from an External Server 98Summary 100Part II: UI 101Chapter 6: Interacting with the User 103Downloading and Installing jQuery UI 103 Recipe: Dragging Elements 104Recipe: Dropping Elements 111Recipe: Changing the Order of Elements by Using Sortable 116Example: Sorting Elements in a Tree Structure 123Recipe: Selecting Elements in an Unordered List 124Example: Selecting Elements in a Tree Structure 128Recipe: Resizing Elements 130Summary 134Chapter 7: Interacting with Widgets 135Recipe: Grouping Content by Using the Accordion 135Recipe: Suggesting Input Values by Using Autocomplete 142Recipe: Transforming Elements into Buttons 147Example: Styling Radio Buttons by Using a Buttonset 151Recipe: Choosing Dates by Using the Datepicker 152Recipe: Attracting Attention with the Dialog 160Recipe: Displaying Status of a Process by Using the Progressbar 168Recipe: Retrieving Numbers by Using a Slider 170Recipe: Navigating a Page by Using Tabs 174Summary 181Part III: Mobile 183Chapter 8: Changing the Look and Feel 185Changing the Styling of jQuery UI Components 185 Creating Animations by Using jQuery Core 186Recipe: Animating Colors by Using jQuery UI 187Recipe: Hiding Elements by Using Fade and Slide in jQuery Core 189Recipe: Adding Graphical Effects by Using jQuery UI 191Recipe: Animating Addition and Removal of CSS Classes by Using jQuery UI 192Recipe: Displaying all Easing Functions in jQuery UI as Charts 194Recipe: Displaying All Icons in jQuery UI 196Recipe: Executing Code at the End of an Animation with a Promise 198Recipe: Executing Code Within Animations by Using Queue and Dequeue 200Summary 202Chapter 9: Navigating Pages by Using jQuery Mobile 203Recipe: Setting Up jQuery Mobile Basics 203 Recipe: Serving Multiple Pages from a Single HTML File 205Recipe: Changing the Title Element 206Recipe: Loading External Pages Using AJAX 208Recipe: Displaying Page Loading Messages 210Recipe: Linking to External Pages without AJAX 212Recipe: Specifying the Transition Animation 213Recipe: Specifying Custom Transition Animations 214Recipe: Listening to Mobile Events 217Recipe: Generating Back Buttons 221Recipe: Adding Footers to the Bottom of the Page 223Recipe: Fixing the Footer Across Pages 225Recipe: Keeping the Footer in a Fixed Position 227Recipe: Hiding and Showing the Footer 229Recipe: Optimizing Headers and Footers for Fullscreen View 231Recipe: Changing Color Schemes with Themes 232Recipe: Using Multiple Columns 234Recipe: Changing Pages by Using JavaScript Calls 236Recipe: Loading Pages by Using JavaScript Calls 239Recipe: Attaching Data to DOM Nodes in jQuery Mobile 241Recipe: Utilizing jQuery Mobile Helper Functions 242Summary 246Chapter 10: Interacting with jQuery Mobile 249Recipe: Displaying Toolbars Inline in Content 249 Recipe: Displaying a Warning Bar 250Recipe: Adding Menu Bars to Footer Elements 252Recipe: Navigating with a Navigation Bar 253Recipe: Showing and Hiding Elements by Using Collapsible 257Recipe: Adding Accordion Behavior by Using Collapsible Sets 258Recipe: Acquiring Basic Text Input by Using Form Fields 260Recipe: Acquiring Calendar-Based Input 261Recipe: Displaying Input Fields by Using Alternative Keyboards 263Recipe: Displaying Specialized Input Fields 265Recipe: Acquiring Integers by Using Sliders 267Recipe: Setting Binaries with Flip Switches 268Recipe: Selecting a Single Element by Using Radio Buttons 269Recipe: Selecting Multiple Elements by Using Check Boxes 271Recipe: Selecting Elements from Drop-Down Lists 273Recipe: Displaying Native Forms by Using jQueryMobile Off 276Recipe: Displaying Lists of Elements 278Recipe: Filtering List Elements 286Recipe: Grouping Form Elements in Lists 288Summary 289Part IV: Plugins 291Chapter 11: Creating Plugins 293Recipe: Setting Up a Simple Static Plugin 293 Recipe: Creating Simple Context-Aware Plugins 295Recipe: Chaining jQuery Functions and Plugins 296Recipe: Parameterizing Plugins 297Recipe: Providing Default Parameters 299Recipe: Operating the Plugin by Using Methods 300Recipe: Creating a Plugin that Creates Plugins 303Recipe: Registering and Invoking Callback Functions 306Recipe: Passing Context to Callback Functions 308Recipe: Returning Deferred Objects to Call Separate Callbacks on Success and on Error 309Recipe: Returning a Promise to Protect Internals 311Recipe: Demonstrating the Promise(d) Protection 312Recipe: Using Promise to Control Flow Structures 314Recipe: Visualizing Progress Before the Final Callback 315Recipe: Providing Context to Callback Functions 317Recipe: Providing a Context to Progress Functions 319Summary 320Chapter 12: Working with Third-Party Plugins 323Recipe: Displaying a Modal 323 Recipe: Using a Drop-Down Menu 326Recipe: Using ScrollSpy 328Recipe: Toggling Tabs 331Recipe: Adding Tooltips 333Recipe: Adding a Popover 334Recipe: Alerting the User 336Recipe: Button Control 338Recipe: Collapsing Content 341Recipe: Putting Content in a Carousel 344Recipe: Using typeahead for Autocomplete 347Summary 349Index 351

最近チェックした商品