From 21c316e89652395044095109dcd6ec82c142a508 Mon Sep 17 00:00:00 2001 From: Markus Amalthea Magnuson Date: Mon, 25 Feb 2013 00:06:30 +0100 Subject: [PATCH 1/7] Style fixes in CONTRIBUTING.md * e.g., -> e.g. * Github -> GitHub --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5013c8bb..cb112fa3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -7,7 +7,7 @@ customFields: --- Depending on your level of experience with some of the workflows common to many -open source projects, e.g., git/Github, the command line, and setting up a +open source projects, e.g. git/GitHub, the command line, and setting up a local development environment, contributing to this site may be a breeze or come with a bit of a learning curve. If you fit into the former group, great! Jump ahead to learn how to get started. From 631c87d2518c16341006717383fbb440e25c2f63 Mon Sep 17 00:00:00 2001 From: Markus Amalthea Magnuson Date: Mon, 25 Feb 2013 00:07:58 +0100 Subject: [PATCH 2/7] Style fixes in index.html * Fix unmatched

tag * Always use curly apostrophe * "just out of the reach" -> "just out of reach" --- page/index.html | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/page/index.html b/page/index.html index 562fbce5..fb76507c 100644 --- a/page/index.html +++ b/page/index.html @@ -10,17 +10,14 @@

Learning Center

- + \ No newline at end of file From 445481c2d0c5b35c421c2e493dfee143e74cdd11 Mon Sep 17 00:00:00 2001 From: Markus Amalthea Magnuson Date: Mon, 25 Feb 2013 00:13:37 +0100 Subject: [PATCH 3/7] Style fixes in about-jquery * Curly apostrophes * Em dashes * Proper capitalization of abbreviations (HTML etc.) * Linkify jsbin.com --- page/about-jquery/additional-support.md | 20 ++++++++++---------- page/about-jquery/how-jquery-works.md | 12 ++++++------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/page/about-jquery/additional-support.md b/page/about-jquery/additional-support.md index d99a477b..8f1ff94a 100644 --- a/page/about-jquery/additional-support.md +++ b/page/about-jquery/additional-support.md @@ -14,7 +14,7 @@ There are many subforums where you can discuss jQuery, ask questions, talk about * This is the best place to post if you are brand new to jQuery and JavaScript. * [Using jQuery](http://forum.jquery.com/using-jquery) * This is the best place to post if you have general questions or concerns. - * If you've built a site that uses jQuery, or would like to announce a new plugin, this is the place to do it. + * If you’ve built a site that uses jQuery, or would like to announce a new plugin, this is the place to do it. * [Using jQuery Plugins](http://forum.jquery.com/using-jquery-plugins) * If you are a plugin author or user and you wish to discuss specific plugins, plugin bugs, new features, or new plugins. * [Using jQuery UI](http://forum.jquery.com/using-jquery-ui) @@ -27,7 +27,7 @@ There are many subforums where you can discuss jQuery, ask questions, talk about * [Developing jQuery Plugins](http://forum.jquery.com/developing-jquery-plugins) * This forum covers development of jQuery plugins. * [Developing jQuery UI](http://forum.jquery.com/developing-jquery-ui) - * This is the place to discuss development of [jQuery UI](http://jqueryui.com/) itself - including bugs, new plugins, and how you can help. + * This is the place to discuss development of [jQuery UI](http://jqueryui.com/) itself — including bugs, new plugins, and how you can help. * All jQuery UI svn commits are posted to this list to facilitate feedback, discussion, and review. * Also note that a lot of the development and planning of jQuery UI takes place on the [jQuery UI Development and Planning Wiki](http://wiki.jqueryui.com/). * [Developing jQuery Mobile](http://forum.jquery.com/developing-jquery-mobile) @@ -37,16 +37,16 @@ There are many subforums where you can discuss jQuery, ask questions, talk about At the bottom of each of the forums is an RSS feed you can subscribe to. -To ensure that you'll get a useful answer in no time, please consider the following advice: +To ensure that you’ll get a useful answer in no time, please consider the following advice: * Ensure your markup is valid. * Use Firebug/Developer Tools to see if you have an exception. -* Use Firebug/Developer Tools to inspect the html classes, css. etc. -* Try expected resulting html and css without javascript/jQuery and see if the problem could be isolated to those two. +* Use Firebug/Developer Tools to inspect the HTML classes, CSS, etc. +* Try expected resulting HTML and CSS without JavaScript/jQuery and see if the problem could be isolated to those two. * Reduce to a minimal test case (keep removing things until the problem goes away, etc.) -* Provide that test case as part of your mail. Either upload it somewhere or post it on jsbin.com. +* Provide that test case as part of your mail. Either upload it somewhere or post it on [jsbin.com](http://jsbin.com/). -In general, keep your question short and focused and provide only essential details - others can be added when required. +In general, keep your question short and focused and provide only essential details — others can be added when required. ### Mailing List Archives @@ -71,8 +71,8 @@ The IRC Channel is best if you need quick help with any of the following: * JavaScript * jQuery syntax -* problem solving -* strange bugs. +* Problem solving +* Strange bugs If your problem is more in-depth, we may ask you to post to the mailing list, or the bug tracker, so that we can help you in a more-suitable environment. @@ -90,4 +90,4 @@ If you wish to post code snippets to the channel, you should use a paste site, l ### StackOverflow -There is an active and well-informed support community at [StackOverflow](http://stackoverflow.com/questions/tagged/jquery). You can likely find an answer for whatever issue you're experiencing. If your question isn't addressed, you can ask a new question and often receive a quick response. \ No newline at end of file +There is an active and well-informed support community at [StackOverflow](http://stackoverflow.com/questions/tagged/jquery). You can likely find an answer for whatever issue you’re experiencing. If your question isn’t addressed, you can ask a new question and often receive a quick response. \ No newline at end of file diff --git a/page/about-jquery/how-jquery-works.md b/page/about-jquery/how-jquery-works.md index 2419bf5b..0f805923 100644 --- a/page/about-jquery/how-jquery-works.md +++ b/page/about-jquery/how-jquery-works.md @@ -5,7 +5,7 @@ level: beginner ### jQuery: The Basics This is a basic tutorial, designed to help you get started using jQuery. If you -don't have a test page setup yet, start by creating the following HTML page: +don’t have a test page setup yet, start by creating the following HTML page: ``` @@ -39,7 +39,7 @@ window.onload = function() { } ``` -Unfortunately, the code doesn't run until all images are finished downloading, including banner ads. +Unfortunately, the code doesn’t run until all images are finished downloading, including banner ads. To run code as soon as the `document` is ready to be manipulated, jQuery has a statement known as the [ ready event ](http://api.jquery.com/ready): @@ -80,7 +80,7 @@ $( document ).ready(function() { The following example illustrates the click handling code discussed above, embedded directly in the HTML ``. Note that in practice, it is usually better to place your code in a separate JS file -and load it on the page with a ` \ No newline at end of file From 4ad13ff186451ae381eb7eb5170177559b19f7c9 Mon Sep 17 00:00:00 2001 From: Markus Amalthea Magnuson Date: Tue, 5 Mar 2013 00:09:24 +0100 Subject: [PATCH 7/7] Code style fixes. * Spaces to tabs. * More spaces around arguments. * HTML style guide adherence. --- page/about-jquery/how-jquery-works.md | 90 +++++++++++++-------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/page/about-jquery/how-jquery-works.md b/page/about-jquery/how-jquery-works.md index e7185a4a..f21205db 100644 --- a/page/about-jquery/how-jquery-works.md +++ b/page/about-jquery/how-jquery-works.md @@ -10,17 +10,17 @@ don't have a test page setup yet, start by creating the following HTML page: ``` - - - Demo - - - jQuery - - - + + + Demo + + + jQuery + + + ``` @@ -35,7 +35,7 @@ many JavaScript programmers wrap their code in an `onload` function: ``` window.onload = function() { - alert("welcome"); + alert( "welcome" ); } ``` @@ -45,7 +45,7 @@ known as the [ready event](http://api.jquery.com/ready): ``` $( document ).ready(function() { - // Your code here + // Your code here }); ``` @@ -53,9 +53,9 @@ For example, inside the `ready` event, you can add a click handler to the link: ``` $( document ).ready(function() { - $("a").click(function( event ) { - alert("Thanks for visiting!"); - }); + $( "a" ).click(function( event ) { + alert( "Thanks for visiting!" ); + }); }); ``` @@ -68,10 +68,10 @@ you can prevent the default behavior by calling `event.preventDefault()` in the ``` $( document ).ready(function() { - $("a").click(function( event ) { - alert("As you can see, the link no longer took you to jquery.com"); - event.preventDefault(); - }); + $( "a" ).click(function( event ) { + alert( "As you can see, the link no longer took you to jquery.com" ); + event.preventDefault(); + }); }); ``` @@ -85,22 +85,22 @@ and load it on the page with a ` - - + + + Demo + + + jQuery + + + ``` @@ -114,16 +114,16 @@ First, add some style information into the `` of the document, like this: ``` ``` Next, add the [addClass()](http://api.jquery.com/addClass) call to the script: ``` -$("a").addClass("test"); +$( "a" ).addClass( "test" ); ``` All `a` elements are now bold. @@ -131,7 +131,7 @@ All `a` elements are now bold. To remove an existing `class`, use [removeClass()](http://api.jquery.com/removeClass): ``` -$("a").removeClass("test"); +$( "a" ).removeClass( "test" ); ``` ### Special Effects @@ -141,9 +141,9 @@ to help you make your web sites stand out. For example, if you create a click handler of: ``` -$("a").click(function( event ){ - event.preventDefault(); - $( this ).hide("slow"); +$( "a" ).click(function( event ){ + event.preventDefault(); + $( this ).hide( "slow" ); }); ``` @@ -194,7 +194,7 @@ Note the use of `function() {`. The anonymous function does exactly one thing: ``` $.get( "myhtmlpage.html", function() { - myCallBack( param1, param2 ); + myCallBack( param1, param2 ); }); ```