Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning jQuery, Third Edition
  • Table Of Contents Toc
Learning jQuery, Third Edition

Learning jQuery, Third Edition

4.4 (23)
close
close
Learning jQuery, Third Edition

Learning jQuery, Third Edition

4.4 (23)

Overview of this book

To build interesting, interactive sites, developers are turning to JavaScript libraries such as jQuery to automate common tasks and simplify complicated ones. Because many web developers have more experience with HTML and CSS than with JavaScript, the library's design lends itself to a quick start for designers with little programming experience. Experienced programmers will also be aided by its conceptual consistency.Learning jQuery Third Edition is revised and updated for version 1.6 of jQuery. You will learn the basics of jQuery for adding interactions and animations to your pages. Even if previous attempts at writing JavaScript have left you baffled, this book will guide you past the pitfalls associated with AJAX, events, effects, and advanced JavaScript language features.Starting with an introduction to jQuery, you will first be shown how to write a functioning jQuery program in just three lines of code. Learn how to add impact to your actions through a set of simple visual effects and to create, copy, reassemble, and embellish content using jQuery's DOM modification methods. The book will step you through many detailed, real-world examples, and even equip you to extend the jQuery library itself with your own plug-ins.
Table of Contents (24 chapters)
close
close
Learning jQuery Third Edition
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
4
Index

Ajax methods


We can retrieve information from the server without requiring a page refresh by calling one of the following Ajax methods. Ajax methods are discussed in detail in Chapter 6.

Issuing requests

Ajax Method

Description

$.ajax(options)

Make an Ajax request using the provided set of options; this is a low-level method that is usually called through other convenience methods

.load(url, [data], [callback])

Make an Ajax request to url, and place the response into the matched elements

$.get(url, [data], [callback], [returnType])

Make an Ajax request to url using the GET method

$.getJSON(url, [data], [callback])

Make an Ajax request to url, interpreting the response as a JSON data structure

$.getScript(url, [callback])

Make an Ajax request to url, executing the response as JavaScript

$.post(url, [data], [callback], [returnType])

Make an Ajax request to url using the POST method

Request monitoring

Ajax Method

Description

.ajaxComplete(handler)

Bind handler to be called when any Ajax transaction completes

.ajaxError(handler)

Bind handler to be called when any Ajax transaction completes with an error

.ajaxSend(handler)

Bind handler to be called when any Ajax transaction begins

.ajaxStart(handler)

Bind handler to be called when any Ajax transaction begins, and no others are active

.ajaxStop(handler)

Bind handler to be called when any Ajax transaction ends, and no others are still active

.ajaxSuccess(handler)

Bind handler to be called when any Ajax transaction completes successfully

Configuration

Ajax Method

Description

$.ajaxSetup(options)

Set default options for all subsequent Ajax transactions

$.ajaxPrefilter([dataTypes], handler)

Modify the options on each Ajax request before it is processed by $.ajax()

$.ajaxTransport(transportFunction)

Define a new transport mechanism for Ajax transactions

Utilities

Ajax Method

Description

.serialize()

Encode the values of a set of form controls into a query string

.serializeArray()

Encode the values of a set of form controls into a JavaScript data structure

$.param(map)

Encode an arbitrary map of values into a query string

$.globalEval(code)

Evaluate the given JavaScript string in the global context

$.parseJSON(json)

Convert the given JSON string into a JavaScript object

$.parseXML(xml)

Convert the given XML string into an XML document

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning jQuery, Third Edition
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon