• Complain

Smashing Magazine - Mastering jQuery

Here you can read online Smashing Magazine - Mastering jQuery full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2011, publisher: Smashing Media GmbH, genre: Home and family. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Smashing Magazine Mastering jQuery

Mastering jQuery: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Mastering jQuery" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

The explosion of JavaScript libraries and frameworks within the front-end development scene has opened up the power of jQuery to a far wider audience than ever before. What began from a necessity of front-end developers to upgrade JavaScript basic API took a new direction of unified implementation between browsers and to make it more compact in its syntax. Thanks to this development, it is possible to actually apply optimized scripts now. A script to find all links of a certain CSS class in a document and bind an event to them requires one single line of code instead of ten. Also, jQuery brings to the party its own API, featuring a host of functions, methods and syntactical peculiarities.
In this Smashing eBook #14 Mastering jQuery, you will learn how to combine JavaScript and jQuery with PHP and, specially, PHPs GD library to create an image manipulation tool to upload an image, then crop it and finally save the revised version to the server. In addition, you will be able to create your own bookmarklets, which are small JavaScript-powered applications in link form. Typically used to extend the functionality of the browser and to interact with Web services, bookmarklets allow you to post onto your own WordPress or Tumblr blog, submit any selected text to Googles search funtion, or modify a current CSS code within a browser just to cite a few!
Special attention is also given to jQuery plugins, which help save time and streamline development as well as allow programmers to avoid having to build every component from scratch. A good plugin saves countless development hours, whereas a bad plugin leads to bugs that must be fixed and so takes more of of your time than actually building the component from scratch. With the help of this eBook, you will get the best hints on how to choose which plugins are really worth considering for your projects and which ones you should avoid.
TABLE OF CONTENTS
- Commonly Confused Bits Of jQuery
- Image Manipulation With jQuery And PHP GD
- Make Your Own Bookmarklets With jQuery
- jQuery Plugin Checklist: Should You Use That jQuery Plug-In?
- Essential jQuery Plugin Patterns
Pages: 122
Language: English
Released: December 2011
Publisher: Smashing Media GmbH

Smashing Magazine: author's other books


Who wrote Mastering jQuery? Find out the surname, the name of the author of the book and a list of all author's works by series.

Mastering jQuery — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Mastering jQuery" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Imprint

Copyright 2012 Smashing Media GmbH, Freiburg, Germany

Version: October 2012 (P ublished in November, 2011)

ISBN: 9783943075168

Cover Design: Ricardo Gimenes

PR & Press: Stephan Poppe

eBook Strategy: Andrew Rogerson & Talita Telma Stckle

Technical Editing: Andrew Rogerson

Proofreading: Andrew Lobo, Iris Ljesnjanin

Idea & Concept: Smashing Media GmbH

About Smashing Magazine

Smashing Magazine is an online magazine dedicated to Web designers and developers worldwide. Its rigorous quality control and thorough editorial work has gathered a devoted community exceeding half a million subscribers, followers and fans. Each and every published article is carefully prepared, edited, reviewed and curated according to the high quality standards set in Smashing Magazine's own publishing policy. Smashing Magazine publishes articles on a daily basis with topics ranging from business, visual design, typography, front-end as well as back-end development, all the way to usability and user experience design. The magazine is and always has been a professional and independent online publication neither controlled nor influenced by any third parties, delivering content in the best interest of its readers. These guidelines are continually revised and updated to assure that the quality of the published content is never compromised.

About Smashing Media GmbH

Smashing Media GmbH is one of the world's leading online publishing companies in the field of Web design. Founded in 2009 by Sven Lennartz and Vitaly Friedman, the company's headquarters is situated in southern Germany, in the sunny city of Freiburg im Breisgau. Smashing Media's lead publication, Smashing Magazine, has gained worldwide attention since its emergence back in 2006, and is supported by the vast, global Smashing community and readership. Smashing Magazine had proven to be a trustworthy online source containing high quality articles on progressive design and coding techniques as well as recent developments in the Web design industry.

About this eBook

The explosion of JavaScript libraries and fra meworks within the front-end development scene has opened up the power of jQuery t o a far wider audience than ever before. What began from a necessity of front-end developers to upgrade JavaScript basic API took a new direction of unified implementation between browsers and to make it more compact in its syntax. Thanks to this development, it is possible to actually apply optimized scripts now. A script to find all links of a certain CSS class in a document and bind an event to them requires one single line of code instead of ten. Also, jQuery brings to the party its own API, featuring a host of functions, methods and syntactical peculiarities.

In this Smashing eBook #14: Mastering jQuery , you will learn how to combine JavaScript and jQuery with PHP and, specially, PHPs GD library to create an image manipulation tool to upload an image, then crop it and finally save the revised version to the server. In addition, you will be able to create your own bookmarklets, which are small JavaScript-powered applications in link form. Typically used to extend the functionality of the browser and to interact with Web services, bookmarklets allow you to post onto your own WordPress or Tumblr blog, submit any selected text to Google's search function, or modify a current CSS code within a browser just to cite a few!

Special attention is also given to jQuery plugins, which help save time and streamline development as well as allow programmers to avoid having to build every component from scratch. A good plugin saves countless development hours, whereas a bad plugin leads to bugs that must be fixed and so takes more of of your time than actually building the component from scratch. With the help of this eBook, you will get the best hints on how to choose which plugins are really worth considering for your projects and which ones you should avoid.

Table of Contents
Commonly Confused Bits Of jQuery

Andy Croxall

The explosion of JavaScript libraries and frameworks such as jQuery onto the front-end development scene has opened up the power of JavaScript to a far wider audience than ever before. It was born of the need expressed by a crescendo of screaming by front-end developers who were fast running out of hair to pull out to improve JavaScripts somewhat primitive API, to make up for the lack of unified implementation across browsers and to make it more compact in its syntax.

All of which means that, unless you have some odd grudge against jQuery, those days are gone you can actually get stuff done now. A script to find all links of a certain CSS class in a document and bind an event to them now requires one line of code, not 10. To power this, jQuery brings to the party its own API, featuring a host of functions, methods and syntactical peculiarities. Some are confused or appear similar to each other but actually differ in some way. This article clears up some of these confusions.

1..parent() vs..parents() vs..closest()

All three of these methods are concerned with navigating upwards through the DOM, above the element(s) returned by the selector, and matching certain parents or, beyond them, ancestors. But they differ from each other in ways that make them each uniquely useful.

parent(selector)

This simply matches the one immediate parent of the element(s). It can take a selector, which can be useful for matching the parent only in certain situations. For example:

$('span#mySpan').parent().css('background', '#f90');

$('p').parent('div.large').css('background', '#f90');

The first line gives the parent of #mySpan . The second does the same for parents of all

tags, provided that the parent is a div and has the class large .

Tip: the ability to limit the reach of methods like the one in the second line is a common feature of jQuery. The majority of DOM manipulation methods allow you to specify a selector in this way, so its not unique to parent() .

parents(selector)

This acts in much the same way as parent() , except that it is not restricted to just one level above the matched element(s). That is, it can return multiple ancestors . So, for example:

$('li.nav').parents('li'); //for each LI that has the class nav, go find all its parents/ancestors that are also LIs

This says that for each

  • that has the class nav , return all its parents/ancestors that are also
  • s. This could be useful in a multi-level navigation tree, like the following:
    • Link 1
      • Sub link 1.1
      • Sub link 1.2
      • Sub link 1.3
    • Link 2
      • Sub link 2.1
      • Sub link 2.2

    Imagine we wanted to color every third-generation

  • in that tree orange. Simple:

    $('#nav li').each(function() {

    if ($(this).parents('#nav li').length == 2)

    $(this).css('color', '#f90');

    });

    This translates like so: for every

  • found in #nav (hence our each() loop), whether its a direct child or not, see how many
  • parents/ancestors are above it within #nav . If the number is two, then this
  • must be on level three, in which case color.
    closest(selector)

    This is a bit of a well-kept secret, but very useful. It works like parents() , except that it returns only one parent/ancestor. In my experience, youll normally want to check for the existence of one particular element in an elements ancestry, not a whole bunch of them, so I tend to use this more than parents() . Say we wanted to know whether an element was a descendant of another, however deep in the family tree:

    if ($('#element1').closest('#element2').length == 1)

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Mastering jQuery»

Look at similar books to Mastering jQuery. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Mastering jQuery»

Discussion, reviews of the book Mastering jQuery and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.