Learning from jQuery by Callum Macrae

By Callum Macrae

Callum Macrae, "Learning from jQuery" English | ISBN: 1449335195 | 2013 | writer: O’Reilly Media | PDF | 116 pages | five + 1 MB

If you’re ok with jQuery yet a piece shaky with JavaScript, this concise advisor can help you extend your wisdom of the language—especially the code that jQuery covers up for you. Many jQuery devotees write as little code as attainable, yet with a few JavaScript less than your belt, you could hinder mistakes, lessen overhead, and make your software code extra efficient.

This booklet explores occasion dealing with, prototypes, and dealing with the DOM and AJAX via examples and many code. You’ll examine universal conventions and styles in JavaScript and—if you’ve by no means coded with JavaScript before—a educational will take you thru the basics.
Enhance your jQuery code by utilizing item constructors and prototypes
Reduce overhead and achieve extra keep watch over through dealing with occasions with JavaScript
Work with the DOM a lot swifter with JavaScript than you could with jQuery
Send a number of AJAX requests with no need to load the complete jQuery library
Understand the significance of JavaScript code criteria, reviews, code reuse, and anti-patterns
Enlist JavaScript assets, akin to a great IDE, a syntax checker, and model keep an eye on

Show description

Read or Download Learning from jQuery PDF

Best development books

jQuery Cookbook: Solutions & Examples for jQuery Developers

jQuery simplifies construction wealthy, interactive net frontends. Getting begun with this JavaScript library is simple, however it can take years to completely discover its breadth and intensity; this cookbook shortens the training curve significantly. With those recipes, you'll examine styles and practices from 19 major builders who use jQuery for every little thing from integrating basic elements into web content and purposes to constructing advanced, high-performance consumer interfaces.

perfect for novices and JavaScript veterans alike, jQuery Cookbook begins with the fundamentals after which strikes to useful use situations with established ideas to universal internet improvement hurdles. you furthermore may get recipes on complex subject matters, reminiscent of equipment for utilizing jQuery to giant projects.

* resolve difficulties related to occasions, results, dimensions, kinds, subject matters, and person interface components
* the best way to increase your kinds, and the way to place and reposition components on a web page
* utilize jQuery's occasion administration procedure, together with customized occasions and customized occasion info
* Create UI elements-such as tabs, accordions, and modals-from scratch
* Optimize your code to get rid of bottlenecks and confirm top functionality
* the way to attempt your jQuery applications

The book's participants include:

* Cody Lindley
* James Padolsey
* Ralph Whitbeck
* Jonathan Sharp
* Michael Geary and Scott González
* Rebecca Murphey
* Remy Sharp
* Ariel Flesler
* Brian Cherne
* Jörn Zaefferer
* Mike Hostetler
* Nathan Smith
* Richard D. worthy
* Maggie Wachs, Scott Jehl, Todd Parker, and Patty Toland
* Rob Burns

Genes, Development and Cancer: The Life and Work of Edward B. Lewis

Whereas Edward B. (‘Ed’) Lewis is legendary for his contributions to genetics anddev- opmental biology y, few have learn his examine papers. One reason behind this can be availability, guy manhattan having been released in imprecise journalsor as publication chapters. A moment is simply because his papers in these ? elds are very dif?

Social Development in Asia

Such a lot Asian nations have proven a robust dedication to speedy fiscal improvement. Economists have argued that the end result from financial improvement could be unfold equitably in the course of the inhabitants. within the absence of a robust culture of social rights, social improvement in Asia has lengthy been taken without any consideration.

Extra resources for Learning from jQuery

Example text

NodeType === 3, but using the constants makes the code more readable; after all, who has memorized all the values for nodeType? replace call, it will be converted to a regex using new RegExp('swear'), and so won’t be global, meaning that only the first instance of swear will be replaced. Cycling Through Elements Cycling through elements can be useful for, say, adding an event listener to each of them individually or changing an attribute. call(elements[i]); } It’s overkill to do that to merely change the color of a number of elements, but with larger changes it can be a lot cleaner than calling elements[i] every single time, and cleaner than assigning the element to a variable at every iteration of the loop (plus we could have the “last one only” problem—detailed in Chapter 5—if we added an event listener, which this approach solves without requiring an additional closure).

However, the functions provided by jQuery can be rather hefty (especially in older browsers), and it is often a lot faster to just use pure JavaScript. Therefore, it is important to know how both work. Selecting an Element In jQuery, there is only really one way to select an element, and that is with the CSS selector: $('#foo'); In JavaScript, there are several ways. You can select elements with their CSS selector (which I will cover later), but it isn’t supported in Internet Explorer versions earlier than 8, so I will cover the traditional methods first.

Optimizations | 51 Strictly speaking, micro-optimizations should be the job of the browser. However, not all browsers have fast JavaScript engines, and some people would argue that the day when micro-optimizations are no longer necessary is not yet here. However, it is important to know a few of the most effective micro-optimizations for JavaScript; if you’re writing code that could be used on the server side or on very old browsers, micro-optimizations could help. To read about optimizing your code in far more detail than I could fit into a section of a chapter, check out High Performance JavaScript by Nicholas C.

Download PDF sample

Rated 4.70 of 5 – based on 22 votes