Learning jquery third edition ebook free download




















Explore a preview version of Learning jQuery 3 - Fifth Edition right now. Create efficient and smart web applications with jQuery 3. This book is ideal for client-side JavaScript developers.

You do need to have any previous experience with jQuery, although basic JavaScript programming knowledge is necessary. If you are a web developer and want to create web applications that look good, are efficient, have rich user interfaces, and integrate seamlessly with any backend using AJAX, then this book is the ideal match for you.

We'll show you how you can integrate jQuery 3. We start by configuring and customising the jQuery environment, and getting hands-on with DOM manipulation.

Next, we'll explore event handling advanced animations, creating optimised user interfaces, and building useful third-party plugins. Also, we'll learn how to integrate jQuery with your favourite back-end framework. APC June Custom PC May Maximum PC November Skip to content Other 0. What you will learn from this book : Create interactive elements for your web designs Learn how to create the best user interface for your web applications Use selectors in a variety of ways to get anything you want from a page Make things happen on your webpages with events Add flair to your actions with a variety of animation effects Discover the new features available in jQuery 1.

Who this book is written for This book is for web designers who want to create interactive elements for their designs, and for developers who want to create the best user interface for their web applications. Leave a Reply Cancel reply Your email address will not be published. Video Tutorials. Uses the browser's native DOM ready implementations when available and adds a window. Simulates a DOM ready event in some older browsers by repeatedly checking for the existence of a DOM method that typically becomes available at the same time as the DOM.

However, as demonstrated in the original version of the script, and repeated in Listing 1. This anonymous function idiom is convenient in jQuery code for methods that take a function as an argument when that function isn't reusable. Moreover, the closure it creates can be an advanced and powerful tool. However, it may also have unintended consequences and ramifications on memory use, if not dealt with carefully.

The poem stanzas are now italicized and enclosed in boxes, as specified by the Even a task as simple as this can be complicated without jQuery at our disposal. In plain JavaScript, we could add the highlighted class as shown in the following code snippet:. Despite its length, this solution does not handle many of the situations that jQuery takes care of for us in Listing 1. We can see that our jQuery-driven code is easier to write, simpler to read, and faster to execute than its plain JavaScript equivalent.

As this code comparison has shown, jQuery code is typically shorter and clearer than its basic JavaScript equivalent. However, this doesn't mean we will always write code that is free from bugs, or that we will intuitively understand what is happening on our pages at all times. Our jQuery coding experience will be much smoother with the assistance of standard development tools. High-quality development tools are available in all modern browsers.

We can feel free to use the environment that is most comfortable to us. Options include:. While the details of these features vary from one browser to the next, the general concepts remain constant.

In this book, some examples will require the use of one of these toolkits; we will use Firebug for these demonstrations, but development tools for other browsers are fine alternatives. The tool is too involved to explore in great detail here, but a survey of some of the most relevant features will be useful to us.

Firebug is a quickly-evolving project, so the following screenshots may not exactly match your environment. In the default HTML tab of this panel, we can see a representation of the page structure on the left side, and details of the selected element such as the CSS rules that apply to it on the right side.

This tab is especially useful for investigating the structure of the page and debugging CSS issues, as shown in the following screenshot:.

The Script tab allows us to view the contents of all loaded scripts on the page, as shown in the preceding screenshot. By clicking on a line number, we can set a breakpoint; when the script reaches a line with a breakpoint, it will pause until we resume execution with a button click.

On the right side of the page, we can enter a list of variables and expressions we wish to know the value of at any time. The Console tab will be of most frequent use to us while learning jQuery, as shown in the following screenshot.

A field at the bottom of the panel allows us to enter any JavaScript statement, and the result of the statement is then presented in the panel:.

In this example, we have performed the same jQuery selector as in Listing 1. Even so, the statement gives us interesting information. We see that the result of the selector is a jQuery object pointing to two. We can use this console feature to quickly try out jQuery code at any time, right from within the browser. In addition, we can interact with this console directly from our code, using the console. This code illustrates that we can pass any kind of expression into the console. Simple values such as strings and numbers are printed directly, and more complicated values such as jQuery objects are nicely formatted for our inspection, as shown in the following screenshot:.

This console. We now have an idea of why a developer would choose to use a JavaScript framework rather than writing all code from scratch, even for the most basic tasks. We also have seen some of the ways in which jQuery excels as a framework, why we might choose it over other options, and in general which tasks jQuery makes easier. We have also explored the development tools we will be relying on when writing, testing, and debugging our jQuery code.

The simple example we have been using demonstrates how jQuery works, but is not very useful in real-world situations. In the next chapter, we will expand on the code here by exploring jQuery's sophisticated selector language, finding practical uses for this technique.

Karl Swedberg is a web developer at Fusionary Media in Grand Rapids, Michigan, where he spends much of his time making cool things happen with JavaScript.

He is also a member of jQuery's Board of Advisors and a presenter at workshops and conferences. When he isn't coding, he likes to hang out with his family, roast coffee in his garage, and exercise at the local CrossFit gym.

About this book To build interesting, interactive sites, developers are turning to JavaScript libraries such as jQuery to automate common tasks and simplify complicated ones. Publication date: September Publisher Packt. Pages ISBN Chapter 1. Getting Started. What jQuery does. Why jQuery works well.



0コメント

  • 1000 / 1000