Table of contents : Beginning jQuery 2 for ASP.NET Developers......Page 310 Contents at a Glance......Page 3 Contents......Page 313 About the Author......Page 320 About the Technical Reviewer......Page 321 Acknowledgments......Page 322 Introduction......Page 4 Your First JavaScript Program......Page 7 Basic Programming Constructs......Page 11 Built-in Functions......Page 12 Boolean......Page 14 Variables......Page 15 Arrays......Page 16 Conditional Checking......Page 18 Looping......Page 20 Working with Strings......Page 21 Extracting Part of a String......Page 22 Getting an Array from a String......Page 23 Working with Numbers......Page 24 Converting a String into a Number......Page 25 Working with Dates and Times......Page 26 Writing Functions......Page 28 Writing JavaScript Code in a Separate File......Page 32 Error Handling......Page 34 Summary......Page 37 jQuery Is a JavaScript Library......Page 38 Handling Events......Page 39 Adding a Copy of the jQuery Library to a Local Folder......Page 40 Adding the jQuery Library Using the jQuery NuGet Package......Page 42 Referencing the jQuery Library from a Content Delivery Network (CDN)......Page 43 Benefits of Using a CDN......Page 44 Referencing jQuery from Web Forms and Views......Page 45 Visual Studio IDE and jQuery Code......Page 47 Code Formatting and Navigation......Page 48 IntelliSense......Page 49 Reference Directives......Page 50 Debugging JavaScript and jQuery Code......Page 51 Writing Your First jQuery Program in ASP.NET Web Forms......Page 52 Anonymous Functions......Page 58 Server Control IDs and the jQuery ID Selector......Page 59 Writing Your First jQuery Program in ASP.NET MVC......Page 60 Summary......Page 67 Overview of jQuery Selectors......Page 68 Basic Selectors......Page 70 Basic Filters......Page 76 Attribute Selectors......Page 79 Child Filters......Page 83 Content Filters......Page 88 Form Filters......Page 90 Hierarchy Filters......Page 96 Visibility Filters......Page 100 Using Selectors in ASP.NET MVC......Page 101 Summary......Page 106 Overview of Event Handling......Page 107 Handling and Raising Events......Page 109 Obtaining Event Information......Page 110 Window and Document Events......Page 111 Mouse Events......Page 115 Keyboard Events......Page 121 Form Events......Page 126 Advanced Event Handling Concepts......Page 131 Stopping Default Event Behavior......Page 132 Passing Event Data......Page 133 Using on(), off, and trigger()......Page 135 Summary......Page 137 CSS Classes and Styles......Page 138 Working with Attributes and Properties......Page 146 Changing the Contents of DOM Elements......Page 149 Adding and Removing DOM Elements......Page 150 Copying DOM Elements......Page 151 Creating an RSS Reader Widget......Page 152 Summary......Page 158 Tree Traversal......Page 159 Using Tree Traversal Methods......Page 161 Filtering......Page 165 Using Filtering Methods......Page 167 Iterating and Searching......Page 170 Using each( ) and find( )......Page 171 Accessing Custom Data Attributes......Page 173 Using data() Method......Page 174 Other Useful Methods......Page 178 Summary......Page 179 Showing and Hiding Elements......Page 180 Adding Sliding Effects......Page 183 Adding Fading Effects......Page 187 Performing Custom Animations......Page 190 Stopping the Animation......Page 192 Summary......Page 193 Ajax Overview......Page 194 Interactive User Interface......Page 196 Understanding the JSON Format......Page 197 Understanding Json.NET......Page 199 jQuery Ajax Methods......Page 200 Loading HTML Markup Using load()......Page 201 Loading and Executing a Script Using $.getScript()......Page 204 Making GET Requests Using $.get()......Page 205 Making POST Requests Using $.post()......Page 208 Using the $.ajax( ) Method......Page 209 Making Ajax Call to an ASMX Web Service......Page 211 Making an Ajax Call to a Page Method......Page 214 Making an Ajax Call to a WCF Service......Page 215 Making an Ajax Call to a Controller Action......Page 217 Making an Ajax call to a Web API......Page 221 Summary......Page 230 Understanding jQuery Plugins......Page 231 Using the PowerTip Plugin......Page 232 Customizing PowerTip Tooltips......Page 237 Overview of JavaScript Function Prototypes......Page 239 Creating Your Own Plugin......Page 240 Defining a Basic Plugin......Page 241 Supporting Chaining......Page 243 Preserving the Meaning of $......Page 244 Adding Actions to Plugins......Page 245 Iterating Through the Selected DOM Elements......Page 246 Making a Plugin Configurable......Page 248 Developing a popupAd Plugin......Page 250 Summary......Page 254 Overview of jQuery UI......Page 255 Downloading and Referencing jQuery UI......Page 256 Using the Accordion Widget......Page 259 Handling beforeActive and create Events......Page 262 Changing the Default Theme......Page 264 Developing Mobile Web Applications......Page 265 Downloading and Installing jQuery Mobile......Page 267 Using jQuery Mobile......Page 268 Creating the Home Controller......Page 269 Developing the Index View......Page 271 Creating the Edit View......Page 272 Creating the Update View and Testing the Application......Page 275 Detecting Mobile Device in ASP.NET......Page 278 Detecting a Mobile Device in Web Forms......Page 279 Summary......Page 280 Recipe 1: Converting GridView Data to CSV......Page 281 Recipe 2: Implementing Ajax Based Paging......Page 284 Recipe 3: Client-Side Sorting in a Table......Page 288 Recipe 4: Creating Cascading Drop-Down Lists......Page 291 Recipe 5: Creating an Autocomplete Text Box......Page 294 Recipe 6: Uploading Files......Page 296 Summary......Page 299 Articles on ASP.NET, HTML5 & jQuery......Page 300 The jQuery Plugin Registry......Page 301 Index......Page 302