From 5cef15f315fac088a3cfc2525bebbbc768232e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 6 Jan 2014 14:43:24 -0500 Subject: [PATCH 001/311] Build: Upgrade to grunt-jquery-content 0.11.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4fdb6d00..c586d301 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "grunt-clean": "0.3.0", "grunt-html": "0.1.1", "grunt-wordpress": "1.0.7", - "grunt-jquery-content": "0.9.0", + "grunt-jquery-content": "0.11.1", "grunt-check-modules": "0.1.0", "js-yaml": "2.0.1" } From ba4f58656c6f0de08187a80c0d16348288fc3ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 6 Jan 2014 14:43:45 -0500 Subject: [PATCH 002/311] 0.3.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c586d301..135c7d14 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "learn.jquery.com", "title": "jQuery Learning Site", "description": "jQuery Foundation site for learning jQuery and JavaScript", - "version": "0.3.3", + "version": "0.3.4", "homepage": "http://learn.jquery.com", "author": { "name": "jQuery Foundation (http://jquery.org/)" From b88d135f921d0a812371dba7e48bb05f9cb3e8d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 8 Jan 2014 18:04:12 -0500 Subject: [PATCH 003/311] Advanced Plugin Concepts: Changed "Firebug console" to "console" Closes gh-453 --- page/plugins/advanced-plugin-concepts.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/plugins/advanced-plugin-concepts.md b/page/plugins/advanced-plugin-concepts.md index 8dbec188..4d736479 100644 --- a/page/plugins/advanced-plugin-concepts.md +++ b/page/plugins/advanced-plugin-concepts.md @@ -110,7 +110,7 @@ This technique makes it possible for others to define and ship transition defini The technique of exposing part of your plugin to be overridden can be very powerful. But you need to think carefully about what parts of your implementation to expose. Once it's exposed, you need to keep in mind that any changes to the calling arguments or semantics may break backward compatibility. As a general rule, if you're not sure whether to expose a particular function, then you probably shouldn't. -So how then do we define more functions without cluttering the namespace and without exposing the implementation? This is a job for closures. To demonstrate, we'll add another function to our plugin called "debug". The debug function will log the number of selected elements to the Firebug console. To create a closure, we wrap the entire plugin definition in a function (as detailed in the jQuery Authoring Guidelines). +So how then do we define more functions without cluttering the namespace and without exposing the implementation? This is a job for closures. To demonstrate, we'll add another function to our plugin called "debug". The debug function will log the number of selected elements to the console. To create a closure, we wrap the entire plugin definition in a function (as detailed in the jQuery Authoring Guidelines). ``` // Create closure. From c99484286c36327c45be77f1e59a7b157ec0cec3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Wed, 8 Jan 2014 18:07:06 -0500 Subject: [PATCH 004/311] 0.3.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 135c7d14..b8081066 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "learn.jquery.com", "title": "jQuery Learning Site", "description": "jQuery Foundation site for learning jQuery and JavaScript", - "version": "0.3.4", + "version": "0.3.5", "homepage": "http://learn.jquery.com", "author": { "name": "jQuery Foundation (http://jquery.org/)" From 48242d8e16b836176594b949612d0f2dbceb8937 Mon Sep 17 00:00:00 2001 From: Ahmed Abdel Razzak Date: Thu, 9 Jan 2014 14:05:47 +0200 Subject: [PATCH 005/311] Widget Factory: Fix rendering negative progressbar value Closes gh-454 --- page/jquery-ui/widget-factory/how-to-use-the-widget-factory.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/page/jquery-ui/widget-factory/how-to-use-the-widget-factory.md b/page/jquery-ui/widget-factory/how-to-use-the-widget-factory.md index fe3b175f..5bde8210 100644 --- a/page/jquery-ui/widget-factory/how-to-use-the-widget-factory.md +++ b/page/jquery-ui/widget-factory/how-to-use-the-widget-factory.md @@ -118,6 +118,7 @@ $.widget( "custom.progressbar", { value: 0 }, _create: function() { + this.options.value = this._constrain(this.options.value); this.element.addClass( "progressbar" ); this.refresh(); }, @@ -157,6 +158,7 @@ $.widget( "custom.progressbar", { value: 0 }, _create: function() { + this.options.value = this._constrain(this.options.value); this.element.addClass( "progressbar" ); this.refresh(); }, @@ -257,6 +259,7 @@ $.widget( "custom.progressbar", { value: 0 }, _create: function() { + this.options.value = this._constrain(this.options.value); this.element.addClass( "progressbar" ); this.refresh(); }, From 88ddf8eb199691bc3aa098e30b29f74480f70f42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 9 Jan 2014 08:17:29 -0500 Subject: [PATCH 006/311] 0.3.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b8081066..f9c99ee9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "learn.jquery.com", "title": "jQuery Learning Site", "description": "jQuery Foundation site for learning jQuery and JavaScript", - "version": "0.3.5", + "version": "0.3.6", "homepage": "http://learn.jquery.com", "author": { "name": "jQuery Foundation (http://jquery.org/)" From 8dbc4e6d09ffe0241635f3b201ec43f96087255b Mon Sep 17 00:00:00 2001 From: Giustino Borzacchiello Date: Mon, 13 Jan 2014 16:08:59 +0100 Subject: [PATCH 007/311] Basic Plugin Creation: Added missing word 'to' Closes gh-455 --- page/plugins/basic-plugin-creation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/plugins/basic-plugin-creation.md b/page/plugins/basic-plugin-creation.md index 1490ce0e..0e9fe473 100644 --- a/page/plugins/basic-plugin-creation.md +++ b/page/plugins/basic-plugin-creation.md @@ -143,7 +143,7 @@ Notice that we return the results of `.each()` instead of returning `this`. Sinc ## Accepting Options -As your plugins get more and more complex, it's a good idea to make your plugin customizable by accepting options. The easiest way do this, especially if there are lots of options, is with an object literal. Let's change our greenify plugin to accept some options. +As your plugins get more and more complex, it's a good idea to make your plugin customizable by accepting options. The easiest way to do this, especially if there are lots of options, is with an object literal. Let's change our greenify plugin to accept some options. ``` (function ( $ ) { From 2d9e3dba5015cdeb890028ad482f67bfc147af07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Mon, 13 Jan 2014 10:39:05 -0500 Subject: [PATCH 008/311] 0.3.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f9c99ee9..8c99745c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "learn.jquery.com", "title": "jQuery Learning Site", "description": "jQuery Foundation site for learning jQuery and JavaScript", - "version": "0.3.6", + "version": "0.3.7", "homepage": "http://learn.jquery.com", "author": { "name": "jQuery Foundation (http://jquery.org/)" From 395fc580a9c2dfb987ec685174902727ec227b4a Mon Sep 17 00:00:00 2001 From: Tyler Cipriani Date: Tue, 14 Jan 2014 09:53:03 -0700 Subject: [PATCH 009/311] Widget Factory: Fix typo (setter -> getter) Closes gh-456 --- page/plugins/stateful-plugins-with-widget-factory.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/plugins/stateful-plugins-with-widget-factory.md b/page/plugins/stateful-plugins-with-widget-factory.md index 66bc26b6..e3e2e3ef 100644 --- a/page/plugins/stateful-plugins-with-widget-factory.md +++ b/page/plugins/stateful-plugins-with-widget-factory.md @@ -140,7 +140,7 @@ alert( bar.progressbar( "value" ) ); ### Working with Widget Options -One of the methods that is automatically available to our plugin is the option method. The option method allows you to get and set options after initialization. This method works exactly like jQuery's `.css()` and `.attr()` methods: you can pass just a name to use it as a setter, a name and value to use it as a single setter, or a hash of name/value pairs to set multiple values. When used as a getter, the plugin will return the current value of the option that corresponds to the name that was passed in. When used as a setter, the plugin's `_setOption` method will be called for each option that is being set. We can specify a `_setOption` method in our plugin to react to option changes. +One of the methods that is automatically available to our plugin is the option method. The option method allows you to get and set options after initialization. This method works exactly like jQuery's `.css()` and `.attr()` methods: you can pass just a name to use it as a getter, a name and value to use it as a single setter, or a hash of name/value pairs to set multiple values. When used as a getter, the plugin will return the current value of the option that corresponds to the name that was passed in. When used as a setter, the plugin's `_setOption` method will be called for each option that is being set. We can specify a `_setOption` method in our plugin to react to option changes. Responding when an option is set: From e29eac42d4381acbf047699085ce5f2f7078b52a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 14 Jan 2014 13:07:17 -0500 Subject: [PATCH 010/311] 0.3.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8c99745c..5eb6a29d 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "learn.jquery.com", "title": "jQuery Learning Site", "description": "jQuery Foundation site for learning jQuery and JavaScript", - "version": "0.3.7", + "version": "0.3.8", "homepage": "http://learn.jquery.com", "author": { "name": "jQuery Foundation (http://jquery.org/)" From 13436e466acbfc90f1fd0106ba35e8b6b9e9dfc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Sat, 8 Feb 2014 10:03:18 -0500 Subject: [PATCH 011/311] ThemeRoller: Fixed image references Fixes gh-466 --- page/jquery-ui/theming/themeroller.md | 8 ++++---- ..._gallery_new.png => themeroller-gallery-new.png} | Bin ...erface_new.png => themeroller-interface-new.png} | Bin ..._200px.png => themeroller-ready-black-200px.png} | Bin ..._200px.png => themeroller-ready-white-200px.png} | Bin 5 files changed, 4 insertions(+), 4 deletions(-) rename resources/jquery-ui/{Themeroller_gallery_new.png => themeroller-gallery-new.png} (100%) rename resources/jquery-ui/{Themeroller_interface_new.png => themeroller-interface-new.png} (100%) rename resources/jquery-ui/{Themeroller_ready_black_200px.png => themeroller-ready-black-200px.png} (100%) rename resources/jquery-ui/{Themeroller_ready_white_200px.png => themeroller-ready-white-200px.png} (100%) diff --git a/page/jquery-ui/theming/themeroller.md b/page/jquery-ui/theming/themeroller.md index 231389b1..c223f4e2 100644 --- a/page/jquery-ui/theming/themeroller.md +++ b/page/jquery-ui/theming/themeroller.md @@ -8,8 +8,8 @@ level: beginner ThemeRoller is a web app that offers a fun and intuitive interface for designing and downloading custom themes for jQuery UI. You can find ThemeRoller in the "Themes" section of the jQuery UI site, or by following this link: [jQuery UI ThemeRoller](http://jqueryui.com/themeroller) -![ThemeRoller Sidebar](/resources/jquery-ui/themeroller_interface_new.png) -![ThemeRoller Sidebar](/resources/jquery-ui/themeroller_gallery_new.png) +![ThemeRoller Sidebar](/resources/jquery-ui/themeroller-interface-new.png) +![ThemeRoller Sidebar](/resources/jquery-ui/themeroller-gallery-new.png) ### The ThemeRoller Interface @@ -30,8 +30,8 @@ Your theme will include images and CSS that make up a customized version of the Once the theme has been downloaded and unzipped, you will see a folder named `themes`. This folder contains the CSS and images needed for your theme. Copy the theme directory into your project and link to the `themes/all.css` file from your pages. ### Building Custom "ThemeRoller-Ready" Components -![ThemeRoller Ready Banner](/resources/jquery-ui/Themeroller_ready_black_200px.png) -![ThemeRoller Ready Banner](/resources/jquery-ui/Themeroller_ready_white_200px.png) +![ThemeRoller Ready Banner](/resources/jquery-ui/themeroller-ready-black-200px.png) +![ThemeRoller Ready Banner](/resources/jquery-ui/themeroller-ready-white-200px.png) ThemeRoller generates a customized version of the jQuery UI CSS Framework for developing your own ThemeRoller-ready jQuery components. The classes generated by this framework are designed to accommodate common user interface design situations and include states, icons, and various helper classes as well. diff --git a/resources/jquery-ui/Themeroller_gallery_new.png b/resources/jquery-ui/themeroller-gallery-new.png similarity index 100% rename from resources/jquery-ui/Themeroller_gallery_new.png rename to resources/jquery-ui/themeroller-gallery-new.png diff --git a/resources/jquery-ui/Themeroller_interface_new.png b/resources/jquery-ui/themeroller-interface-new.png similarity index 100% rename from resources/jquery-ui/Themeroller_interface_new.png rename to resources/jquery-ui/themeroller-interface-new.png diff --git a/resources/jquery-ui/Themeroller_ready_black_200px.png b/resources/jquery-ui/themeroller-ready-black-200px.png similarity index 100% rename from resources/jquery-ui/Themeroller_ready_black_200px.png rename to resources/jquery-ui/themeroller-ready-black-200px.png diff --git a/resources/jquery-ui/Themeroller_ready_white_200px.png b/resources/jquery-ui/themeroller-ready-white-200px.png similarity index 100% rename from resources/jquery-ui/Themeroller_ready_white_200px.png rename to resources/jquery-ui/themeroller-ready-white-200px.png From 04e8965528b9dbc3c3cb842f299376cf3a3c1ae8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Sat, 8 Feb 2014 10:05:01 -0500 Subject: [PATCH 012/311] 0.3.9 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5eb6a29d..db3853e0 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "learn.jquery.com", "title": "jQuery Learning Site", "description": "jQuery Foundation site for learning jQuery and JavaScript", - "version": "0.3.8", + "version": "0.3.9", "homepage": "http://learn.jquery.com", "author": { "name": "jQuery Foundation (http://jquery.org/)" From 1acb22cef75699fc709fd1b5510668a00417eec3 Mon Sep 17 00:00:00 2001 From: Spencer Rogers Date: Tue, 1 Apr 2014 14:00:22 -0400 Subject: [PATCH 013/311] Understanding Index: Fix typo Fixes gh-471 Closes gh-485 --- page/using-jquery-core/understanding-index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/using-jquery-core/understanding-index.md b/page/using-jquery-core/understanding-index.md index a2b490a3..1b77a515 100644 --- a/page/using-jquery-core/understanding-index.md +++ b/page/using-jquery-core/understanding-index.md @@ -71,7 +71,7 @@ var $div = $( "#last" ); console.log( "Index: " + $div.index( "div" ) ); // 2 ``` -When `.index()` is called with a string argument, there are two things to consider. First, jQuery will implicitly call `.first()` on the original jQuery object. It will be find the index of the first element, not the last element in this case. This is inconsistent, so be careful here. +When `.index()` is called with a string argument, there are two things to consider. First, jQuery will implicitly call `.first()` on the original jQuery object. It will find the index of the first element, not the last element in this case. This is inconsistent, so be careful here. The second point to consider is that jQuery is querying the entire DOM using the passed in string selector and checking the index within that newly queried jQuery object. For example, when using `.index( "div" )` in the last example above, jQuery is selecting all of the `
` elements in the document, then searching for the index that contains the first element in the jQuery object `.index()` is called on. From 3e910aa50843aee92dc74ea3fc42826c93ab8061 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 17:07:22 -0400 Subject: [PATCH 014/311] jQuery UI Getting Started: Remove line number reference Closes gh-484 --- page/jquery-ui/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/jquery-ui/getting-started.md b/page/jquery-ui/getting-started.md index 408375a7..a2c0fe25 100644 --- a/page/jquery-ui/getting-started.md +++ b/page/jquery-ui/getting-started.md @@ -119,7 +119,7 @@ ThemeRoller provides a custom interface for designing all of the elements used b When you click the "Download theme" button in ThemeRoller, you'll be directed to the Download Builder and your custom theme will be auto-selected in the Theme dropdown menu. You can configure your download package further from there. Once you download, you'll see that the `example.html` page is styled using your custom theme. -**Quick Tip:** *If you ever need to edit your theme, simply open the CSS file and find on line 43 where it says "To view and modify this theme, visit ..." That url will open the theme in ThemeRoller for editing.* +**Quick Tip:** *If you ever need to edit your theme, simply open the CSS file and find where it says "To view and modify this theme, visit ..." That URL will open the theme in ThemeRoller for editing.* ### Support: Where Can I Get Help? From 096ff6435b367f12ac68541c8627ecdfcac37e1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 17:12:40 -0400 Subject: [PATCH 015/311] Basic Plugin Creation: Cache jQuery object Closes gh-482 --- page/plugins/basic-plugin-creation.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/page/plugins/basic-plugin-creation.md b/page/plugins/basic-plugin-creation.md index 0e9fe473..0725f61d 100644 --- a/page/plugins/basic-plugin-creation.md +++ b/page/plugins/basic-plugin-creation.md @@ -188,15 +188,16 @@ Here's an example of a small plugin using some of the techniques we've discussed $.fn.showLinkLocation = function() { return this.filter( "a" ).each(function() { - $( this ).append( " (" + $( this ).attr( "href" ) + ")" ); + var link = $( this ); + link.append( " (" + link.attr( "href" ) + ")" ); }); }; }( jQuery )); - // Usage example: - $( "a" ).showLinkLocation(); +// Usage example: +$( "a" ).showLinkLocation(); ``` This handy plugin goes through all anchors in the collection and appends the `href` attribute in parentheses. From 261eb570ba34c11efd21e2b5f86dcff211500aa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 17:16:00 -0400 Subject: [PATCH 016/311] Iterating: Fix typo Closes gh-476 --- page/using-jquery-core/iterating.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/using-jquery-core/iterating.md b/page/using-jquery-core/iterating.md index 4c73245c..9db4dd1c 100644 --- a/page/using-jquery-core/iterating.md +++ b/page/using-jquery-core/iterating.md @@ -209,7 +209,7 @@ $( "input" ).val(function( index, value ) { ``` -One other thing to keep in mind with this implicit iteration is that traversal methods such as `.children()` or `.parent()` will act on each matched element in a connection, returning a combined collection of all children or parent nodes. +One other thing to keep in mind with this implicit iteration is that traversal methods such as `.children()` or `.parent()` will act on each matched element in a collection, returning a combined collection of all children or parent nodes. ### [`.map()`](http://api.jquery.com/map/) From 8c6129f08e508e5cc1f44625661c272879c99d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 17:31:50 -0400 Subject: [PATCH 017/311] Manipulating Elements: Fix typo Closes gh-467 --- page/using-jquery-core/manipulating-elements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/using-jquery-core/manipulating-elements.md b/page/using-jquery-core/manipulating-elements.md index f49ae31e..328a18a0 100644 --- a/page/using-jquery-core/manipulating-elements.md +++ b/page/using-jquery-core/manipulating-elements.md @@ -34,7 +34,7 @@ While there are a variety of ways to move elements around the DOM, there are gen * Place the selected element(s) relative to another element. * Place an element relative to the selected element(s). -For example, jQuery provides `.insertAfter()` and `.after()`. The `.insertAfter()` method places the selected element(s) after the element that provided as an argument. The `.after()` method places the element provided as an argument after the selected element. Several other methods follow this pattern: `.insertBefore()` and `.before()`, `.appendTo()` and `.append()`, and `.prependTo()` and `.prepend()`. +For example, jQuery provides `.insertAfter()` and `.after()`. The `.insertAfter()` method places the selected element(s) after the element provided as an argument. The `.after()` method places the element provided as an argument after the selected element. Several other methods follow this pattern: `.insertBefore()` and `.before()`, `.appendTo()` and `.append()`, and `.prependTo()` and `.prepend()`. The method that makes the most sense will depend on what elements are selected, and whether you need to store a reference to the elements you're adding to the page. If you need to store a reference, you will always want to take the first approach – placing the selected elements relative to another element – as it returns the element(s) you're placing. In this case, `.insertAfter()`, `.insertBefore()`, `.appendTo()`, and `.prependTo()` should be the tools of choice. From d2ba9879f2c954d5c0881628ae354f4080b92704 Mon Sep 17 00:00:00 2001 From: Calvin Tam Date: Wed, 5 Feb 2014 22:07:51 +1100 Subject: [PATCH 018/311] Event Basics: Fixed typo Closes gh-465 --- page/events/event-basics.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/events/event-basics.md b/page/events/event-basics.md index 5d9486af..035aace2 100644 --- a/page/events/event-basics.md +++ b/page/events/event-basics.md @@ -18,7 +18,7 @@ trigger the event. jQuery offers convenience methods for most native browser events. These methods — including `.click()`, `.focus()`, `.blur()`, `.change()`, etc. — are shorthand for jQuery's `.on()` method. The on method is useful for binding the same handler -function to multiple events, when you want to provide data to the event hander, +function to multiple events, when you want to provide data to the event handler, when you are working with custom events, or when you want to pass an object of multiple events and handlers. From b58906ff3cff8620333dcd786593eb9e1968d92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 17:37:21 -0400 Subject: [PATCH 019/311] Getting Started: Fix reference to Firefox Developer Tools Closes gh-461 --- page/javascript-101/getting-started.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/javascript-101/getting-started.md b/page/javascript-101/getting-started.md index 77fa6968..9c803c76 100644 --- a/page/javascript-101/getting-started.md +++ b/page/javascript-101/getting-started.md @@ -80,5 +80,5 @@ Commonly referred to as "developer tools," many browsers ship with built-in feat - [Apple Safari](https://developer.apple.com/technologies/safari/developer-tools.html) - [Google Chrome Developer Tools](https://developers.google.com/chrome-developer-tools/) - [Microsoft Internet Explorer](http://msdn.microsoft.com/en-us/library/ie/gg589507.aspx) -- [Mozilla Firefox Web Development Tools](https://developer.mozilla.org/en-US/docs/Tools) +- [Mozilla Firefox Developer Tools](https://developer.mozilla.org/en-US/docs/Tools) - [Opera Dragonfly](http://www.opera.com/dragonfly/) From 810da31671a47a99841dea6061defd27332219a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 17:40:14 -0400 Subject: [PATCH 020/311] Finding & Evaluating Plugins: Link to plugin registry Closes gh-460 --- page/plugins/finding-evaluating-plugins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/plugins/finding-evaluating-plugins.md b/page/plugins/finding-evaluating-plugins.md index 56544817..ea1c221a 100644 --- a/page/plugins/finding-evaluating-plugins.md +++ b/page/plugins/finding-evaluating-plugins.md @@ -10,7 +10,7 @@ One of the most celebrated aspects of jQuery is its extensive plugin ecosystem. The quality of jQuery plugins varies widely. Many plugins are extensively tested and well-maintained, but others are hastily created and then ignored. More than a few fail to follow best practices. Some plugins, mainly [jQuery UI](http://jqueryui.com/), are maintained by the jQuery team. The quality of these plugins is as good as jQuery itself. -Google is your best initial resource for locating plugins, though the jQuery team is working on an improved plugin repository. Once you've identified some options via a Google search, you may want to consult the jQuery mailing list or the `#jquery` IRC channel to get input from others. +The easiest way to find plugins is to search Google or the [jQuery Plugins Registry](http://plugins.jquery.com/). Once you've identified some options, you may want to consult the [jQuery forums](http://forum.jquery.com/) or the `#jquery` IRC channel to get input from others. When looking for a plugin to fill a need, do your homework. Ensure that the plugin is well-documented, and look for the author to provide lots of examples of its use. Be wary of plugins that do far more than you need; they can end up adding substantial overhead to your page. For more tips on spotting a sub-par plugin, read [Signs of a poorly written jQuery plugin](http://remysharp.com/2010/06/03/signs-of-a-poorly-written-jquery-plugin/) by Remy Sharp. From f0102d58408745a01fb554988becc922ef2fd3f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 17:41:27 -0400 Subject: [PATCH 021/311] 0.3.10 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index db3853e0..e3f0cda5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "learn.jquery.com", "title": "jQuery Learning Site", "description": "jQuery Foundation site for learning jQuery and JavaScript", - "version": "0.3.9", + "version": "0.3.10", "homepage": "http://learn.jquery.com", "author": { "name": "jQuery Foundation (http://jquery.org/)" From 10ed6d1b7e7a83c6b37941b95ba49c8024c9b27a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 20:20:54 -0400 Subject: [PATCH 022/311] Conditional Code: Clarify what is truthy and falsy Fixes gh-450 --- page/javascript-101/conditional-code.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/page/javascript-101/conditional-code.md b/page/javascript-101/conditional-code.md index 5b606ef3..dcf60d94 100644 --- a/page/javascript-101/conditional-code.md +++ b/page/javascript-101/conditional-code.md @@ -43,21 +43,22 @@ Be mindful not to define functions with the same name multiple times within sepa In order to use flow control successfully, it's important to understand which kinds of values are "truthy" and which kinds of values are "falsy." Sometimes, values that seem like they should evaluate one way actually evaluate another. ``` -// Values that evaluate to true: -"0"; -"any string"; -[]; // An empty array. -{}; // An empty object. -1; // Any non-zero number. +// Values that evaluate to false: +false +"" // An empty string. +NaN // JavaScript's "not-a-number" variable. +null +undefined // Be careful -- undefined can be redefined! +0 // The number zero. ``` ``` -// Values that evaluate to false: -""; // An empty string. -NaN; // JavaScript's "not-a-number" variable. -null; -undefined; // Be careful -- undefined can be redefined! -0; // The number zero. +// Everything else evaluates to true, some examples: +"0" +"any string" +[] // An empty array. +{} // An empty object. +1 // Any non-zero number. ``` ## Conditional Variable Assignment with the Ternary Operator From b137fd289aea16ac4c51fa19ff1b116f32fba661 Mon Sep 17 00:00:00 2001 From: Leo Baker-Hytch Date: Mon, 24 Feb 2014 00:46:34 +0000 Subject: [PATCH 023/311] Scope: Fix explanation of variable scope Closes gh-473 --- page/javascript-101/scope.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/javascript-101/scope.md b/page/javascript-101/scope.md index 3a817482..a7963964 100644 --- a/page/javascript-101/scope.md +++ b/page/javascript-101/scope.md @@ -121,7 +121,7 @@ sayHello(); // "hello" console.log( foo ); // "world" ``` -When you reference a global variable within a function, that function can see changes to the variable value after the function is defined. +When, within a function, you reference a variable defined in an outer scope, that function can see changes to the variable's value after the function is defined. ``` var myFunction = function() { From 24e5a0fdc711a83cc7328687f4b1be04334edea4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 20:25:27 -0400 Subject: [PATCH 024/311] Closures: Fix typo Closes gh-458 --- page/javascript-101/closures.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/page/javascript-101/closures.md b/page/javascript-101/closures.md index 8945fc20..b1607563 100644 --- a/page/javascript-101/closures.md +++ b/page/javascript-101/closures.md @@ -44,7 +44,8 @@ Closures can also be used to resolve issues with the `this` keyword, which is un var outerObj = { myName: "outer", outerFunction: function() { - // provide a reference to outerObj through innerFunction"s closure + + // Provide a reference to outerObj through innerFunction's closure var self = this; var innerObj = { myName: "inner", From 90a8bc80afa802fb76da12874eb3523ec5cf4b7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Thu, 3 Apr 2014 20:27:29 -0400 Subject: [PATCH 025/311] Selecting Elements: Fix typo Closes gh-451 --- page/using-jquery-core/selecting-elements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/page/using-jquery-core/selecting-elements.md b/page/using-jquery-core/selecting-elements.md index 68059a93..e05fa7a6 100644 --- a/page/using-jquery-core/selecting-elements.md +++ b/page/using-jquery-core/selecting-elements.md @@ -255,7 +255,7 @@ In order to get the best performance using `:selected`, first select elements wi #### :submit -Using the `:submit` pseudo-selector targets any `" ).appendTo( document.body ); }); ``` From 26b34b10f821b60fa24cf6eb1877ea83a8cf105f Mon Sep 17 00:00:00 2001 From: Bohdan Mel'nyk Date: Fri, 17 Oct 2014 20:51:08 +0300 Subject: [PATCH 174/311] using-jquery-core/selecting-elements.md: ensured consistent teg representation in content. Closes gh-564 Formatted ` elements (for `