HTML and CSS Reference
■ You may have noticed that there are a few rules that are declared multiple times with a vendor prefix (the
-webkit- , -moz- , and such) that might look a little confusing. Because Css3 isn't 100 percent finalized yet, each browser
handles the new rules just a little differently.
this could cause issues for developers if there was no way to compensate between browsers, so vendor prefixes were
added to allow for different rules to be applied to each browser in kind. the hope is that someday soon there will be one
unified syntax for each of the new Css3 rules, but while things are still in flux, this is a necessary evil.
ideal for tasks such as animating the elements on a page, doing calculations on-the-fly, and various other actions that
would otherwise be extremely inconvenient if they required a page refresh.
about because the request would commonly return XML data. Although this isn't the common use case anymore,
the name has stuck. What AJAX allows, in essence, is for a different page to be loaded and its contents returned to
retrieve new data, and return that data to the script that requested it. (We talked about this a little earlier in Chapter 1).
documentation, sometimes confusing syntax, and inconsistent implementation on other browsers. Thus the
to use it in a project.
to everyone. They created frameworks that handled common tasks, overcame cross-browser troubles, and provided
good documentation and support communities for new developers.
There were dozens of these frameworks at first, including MooTools, YUI, Dojo, Prototype, and jQuery. Each had
advantages and disadvantages, but the one that seemed to bolster the most community support was jQuery, largely
for its great documentation and wonderfully simple syntax.
Why Do We Need It?
has lead to a much better development experience for developers using the language. However, there are still cases in
which a library can be very useful. jQuery will deal with any outstanding cross-browser inconsistencies and also give
us the tools we need to perform tasks such as these:
• Creating animations to indicate what's happening in the app: Showing the user what's
happening by animating various actions is a great way to enhance the user interface and it
adds to that overall polish that we're shooting for.
• Handling user events: When the user interacts with the app—whether it's a click, a tap, or
a swipe—the browser fires an event that jQuery can detect and perform a task based on the