Git Product home page Git Product logo

learn.jquery.com's Introduction

The jQuery Learning Site

This site aims to be an authoritative educational resource for those wishing to learn how to use jQuery. From beginners, to more advanced users. It's being driven by the jQuery community.

About

The goal of this site is twofold:

  1. To serve as a central, trustworthy, narrative compendium of information about how to use jQuery and JavaScript.
  2. To remain a timely, vibrant, and community-driven reference with a relatively low barrier to contribution.

Much of the initial content - and spirit - comes from jQuery Fundamentals, an open-source book about jQuery, originally written by Rebecca Murphey and released in 2010. In 2011, Rebecca bequeathed the book unto the jQuery Foundation to serve as the basis for this site. The book was split up into individual sections, whch we iterated on and improved over several months. Early on we wanted to ensure we covered as many relevant topics as possible and reached out to writers in the community to give us permission to integrate some of their blog posts as well.

How This Site Works

This site's core content consists of Markdown files. The template that controls the site's appearance is a child theme of jquery-wp-content, and any issues with the presentation should be directed to that repository.

Site Organization

All of the content lives inside of the subdirectories of the page directory. Each of these subdirectories is considered a chapter, and contains one or more articles, and there is also a top level file that corresponds to each chapter, which contains the chapter's human-readable title and an overview, which will appear on the chapter's landing page.

The order.json file controls the order that chapters and articles appear in the site.

Front Matter

Each of the articles on the site has some JSON "Front Matter" that contains metadata. All articles should include the following:

  • title - The title of the article as it will appear in the site.

"title": "jQuery Event Extensions"

  • level - The approximate level of jQuery experience required to find the article useful. Options: beginner, intermediate, or advanced.

"level": "advanced"

Building and Deploying

To build and deploy your changes for previewing in a jquery-wp-content instance, follow the workflow instructions from our documentation on contributing to jQuery Foundation web sites.

How Can I Help?

We encourage contribution from anyone. For more comprehensive documentation on how to get involved, please read our contributing guide.

learn.jquery.com's People

Contributors

addyosmani avatar agcolom avatar ajpiano avatar arthurvr avatar aurelioderosa avatar bentonam avatar bobholt avatar danheberden avatar darcyclarke avatar dmzza avatar eddiemonge avatar ericladd avatar ethransom avatar githubshrek avatar gjohnson avatar gnarf avatar johnkpaul avatar jsvine avatar jugglinmike avatar jzaefferer avatar krinkle avatar kswedberg avatar mgol avatar mohnish avatar rdworth avatar redwolves avatar scottgonzalez avatar tjvantoll avatar xfq avatar yboulkaid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

learn.jquery.com's Issues

German translation

Howdy guys,

is there any interest in a german translations of the project? web-learn-jquery-com is very useful, why not spread it broader?
If there is any interest in another language of the project, i will try to write down the german version (maybe in the cold months of this year) :-)

regards from austria,
samuel

cron job for deploying latest to the staging site?

I think something like this would be useful. It can be as simple as a shell script that pulls the latest from master, then compiles the site, and finally uses rsync to deploy the /output directory to the server (since it looks like it's not using gh-pages).

I figure it could just be on whoever has the credentials for the learn.jquery.com server's machine, so that stuff can stay out of the repo.

thoughts?

Grow "Ajax Events" section into discussion of global Ajax handling

ajax/ajax-events.md
From @addyosmani: "This is another example of where pulling in examples we have in the API site would really help. Even if we were to just take out the code snippets from http://docs.jquery.com/Ajax_Events and add a lot more narrative around them to explain things that would be better than what we have right now. "

This should just grow to discuss how to handle ajax globally - with both ajax events, as well as prefilters, transports and converters. The content from ajax/ajax-and-forms.md from @ConnorMontgomery about prefilters should be moved here.

In addition, discussion of using your own app-level request mediator instead of just trying to do everything through jQuery's events should probably be here as well.

Content-review: $.ajax()

Below is my initial content review for the $.ajax() section of the learning site. I'll be conducting reviews on more sections soon and posting them so we can discuss/assign writing tasks as needed.

http://stage.learn.jquery.com/ajax/

  • Needs to be significantly more extensive. Currently only scrapes the surface.
  • What is ajax? (more complete technical explanation). I don't think we're properly explaining just how much it can change how a developer looks at the flow of data in an application. Remember that we're talking about educating beginners (and later tackling advanced userS). More questions to address: why would I want to use Ajax? How does it help me?
  • What's the problem with implementing Ajax without jQuery? Why is it more painful? (to a newcomer, a code snippet for how to implement this cross-browser vs using jQuery could perhaps be shown). This would definitely help them appreciate the benefits of abstraction.

http://stage.learn.jquery.com/ajax/key-concepts/

  • Where are all the examples? $.get()? $.post()? etc. A lot of methods are mentioned but as a beginner I would hope to see examples too. This is where we need to either move over examples currently in the API docs or form a bridge between both resources.
  • I would expect/hope to see tutorials here - either in a separate entry or in key concepts. Based on what we have, a reader would appreciate that $.ajax() does a lot, but I think this is where we should be educating them further.
  • Consider covering typical tasks (some of which the API docs do): how do I consume a JSON data feed from an external/local source? worth showing a twitter API example? xml for those still using it?
  • We currently don't have a mention of deferreds at all. 6 months ago I would have said it's considered a more advanced topic, but given just how much power it has to improve the way people approach XHR, should this also be covered here?

http://stage.learn.jquery.com/ajax/jquery-ajax-methods/

  • Again we have nowhere near enough examples. We mention lots of options - perhaps it would be useful going through how to use them?. Don't have to cover everything but give people some snippets to help them 'grok' how it all fits together
  • I think we need to decide how much we rely on the API docs site for our examples. Right now we're trying to push people to look there for examples and narrative (via links), but I think the docs site should cover a) how to use methods, b) gotchas with perhaps some more of the narrative being in the learning site. Thoughts?

http://stage.learn.jquery.com/ajax/ajax-and-forms/

  • Right now we're really not covering the fundamentals of how Ajax works with forms. Traditional form handling vs the new. $.ajax has the power to greatly change everything from validation (e.g 'sorry, your username is taken') through to prefiltering but we've giving a very very minor summary of what is possible. I think we need to somehow address this. A first attempt might at least bring over more examples from the docs.
  • Locate articles that cover this well and see if we can borrow from them. As per the other sections, I do not think we want to end up in another situation (as with the old site) where we're linking to articles that end up outdated with time, so borrow or write this out ourselves.

http://stage.learn.jquery.com/ajax/ajax-events/

This is another example of where pulling in examples we have in the API site would really help. Even if we were to just take out the code snippets from http://docs.jquery.com/Ajax_Events and add a lot more narrative around them to explain things that would be better than what we have right now.

Nanoc inflexibility

If any of the captions include a ' (single quote), the rendered HTML/styling of that section gets mangled. I see in line 32 of Rules, it's using the RegEx that determines the match, which subsequently calls the method that renders the HTML (with <div class="example">...</div>).

For now, I've been modifying the captions to not use any quotes, so the page still looks correct.

I actually fixed this in pull request #56, but like Addy said, we may be ditching Nanoc.

<3

Site CSS missing from code?

I don't know hardly anything about Ruby, but I don't see any CSS for the site layout. I was going to alter some margins of a couple items in the article footers so it would look nicer, but I don't see the CSS and I'm not going to make them inline styles.

dead link: named-function-expressions. working link attached

Hi,
Loving the lessons you've put together. Thank you for making these available.

I've found that the link refered to above is dead.

HTML context:

I prefer the named function expression method of setting a function's name, for some rather in-depth and technical reasons . You are likely to see both methods used in others' JavaScript code.

dead link: href="http://yura.thinkweb2.com/named-function-expressions/"
correct link: http://kangax.github.com/nfe/

Best regards

M

Import and freshen FAQ

Start with importing the very frequently linked http://docs.jquery.com/Frequently_Asked_Questions page
then clean it up

  • 1.8 needs to use .prop instead of .attr
  • 1.11 How do I compress my code needs to be brought up to date (mention Uglify)
  • 1.12 Needs to link to bugs.jquery.com
  • 1.13 should probably be eventually broken into its own article on learning how to think async.
  • 2.1.1 needs to mention .on() and .off()

There are probably a lot of other FAQ's we could come up with just from brainstorming for a few more minutes. I think we should give some consideration to making the "How To" category become FAQs, and have FAQ answers on separate pages. There are advantages to the monolithic "FAQ page," so I'm curious for whether @kswedberg or @addyosmani or others think we should ditch it (for separate pages) or expand it.

Consider revising example 2.49

Original ticket:

I'm not sure example 2.49 is a good example to explain what a closure is.
It has a loop, which might be unnecessary, and a click event, which depends upon the user doing something, rather than simply running the program.

By breaking it out into three (3) distinct functions, I was able to step into (F11) it.
I mention F11 vs. F10 because I've grown used to using F10 to step over jQuery itself.

 function Function1() {
 var text = 'Hello '; // local variable
 var Function2 = function() { // Just because this was defined, doesn't mean it was run.
 alert(text); // text was declared outside of Function2
 }
 text = 'Goodbye ';
 return Function2; // In fact it won't run until Function3 is actually called.
}
 var Function3 = Function1(); // This gets back 'Function2' as a return, but doesn't run Function2
 Function3(); // This actually runs Function2

This helped me to realize that closures are simply variables that are kept after the function is completed, the same as 'static' variables are in Visual Basic.

Notes:

Another ticket that mentions this particular example should be revised is: https://github.com/rmurphey/jqfundamentals/issues/56, however they point out that we perhaps shouldn't be using jQuery in the example given it's the JS fundamentals chapter.

Dan appears to have provided a revised version of the example that's library agnostic here https://github.com/rmurphey/jqfundamentals/issues/56, however we should decide whether we want to stick to using jQuery in parts of this chapter or switch to vanilla JavaScript.

Leaving open for discussion.

New Contributors - Contribution Guide/Discussion

For those interested in contributing to the upcoming jQuery Learning site, welcome!

As you might guess, this is a project focused on creating an authoritative educational resource for those wishing to learn how to use jQuery (ranging from beginners to more advanced users). It's being driven by the jQuery project and we hope that you'll consider contributing some of your time to helping us improve the content we have at the moment and appreciate any of your efforts.

Some history:

The site initially started off with Rebecca Murphey's jQuery Fundamentals book (which she gave us permission to use), which we split up into individual sections, iterated upon and improved over the past few months. Early on we wanted to ensure we covered as many relevant topics as possible and reached out to writers in the community to give us permission to use some of their blog posts, a few of which were integrated into our content as well.

The resulting current state of the site can be viewed here:

http://stage.learn.jquery.com/

Now, there are a few problems with the content we've got at the moment.

  • While much of it made sense in the context of jQF, there are areas that are seriously lacking material and need to be fleshed out further. I've been taking charge lately of reviewing these sections and identifying what needs to be changed. Ajax is an example of one such section: #38 as are the jQuery basics #40 (there are many others in need of improvement too)
  • Although we have permission to use articles from a number of sources, I would say that the book in it's current form isn't an accurate representation of the latest version of jQuery. We need a lot more work covering everything from Deferreds through to attributes/props, on/off and a lot more. The release changelogs on http://blog.jquery.com might help here for anyone wondering what changed.
  • Again, although we have permission to use other people's articles, it doesn't mean that a good article is up to date or reflects the latest best practices. I also think we may need to spend more time fleshing out basics sections like the JavaScript 101

So, how can you help?

We need developers who are either experienced with technical writing or are willing to try their hand at it to take a look at the content we have at the moment and help improve it. If you see a section you feel could be addressed better and would like to get involved, why not open up a new issue, fork the project and keep us updated on your progress improving a section? :) You'll be helping a potentially large number of developers get to grips with the library and it's an excellent way to sharpen your existing skills.

Some notes:

  • If you would like to contribute, forks and pull requests are the best way to do this
  • Should you find an article out there at the moment you feel would be worth incorporating in your pull request, please ensure that you clearly state a) the URL the article came from, b) the original author. This is needed so that we can request permission to use it directly
  • All pull requests will be technically reviewed for accuracy by either me or another member of the team. We may ask that you tweak a submission if there are errors found.
  • We currently have an extensive amount of work being done on the site infrastructure (i.e how the markdown files are being converted, imported, handled etc) so please only change the markdown files themselves and nothing else

How is this different to the jQuery docs?:

Most of this is best addressed in the following thread: #39

Anything else you need to know

We've covered the major points above but some developers have asked us about timelines. At the moment we probably have a few months to get everything in the project tidied up, but there's a lot of work we need to get through during that time. If you would like to tweak your skills and think you could contribute improvements to the project, please feel free to send us through pull requests.

We've happy to take any questions in this thread (or even comments if you'd like to let us know you want to work on something).

This page will be getting moved to the wiki shortly, but thanks to anyone willing to get involved. We appreciate it!

Enforce style consistency in code examples

Right now, we have a lot of code examples in the blocks in our markdown content that come from a lot of different sources - assorted blog posts, the jQuery Fundamentals book, docs.jquery.com, etc. We need to make sure that these examples are wrangled to conform with the jQuery Core style guidelines (with the minor caveat that we'll use two space soft tabs instead of 4 space tabs) so that there is consistency in the coding and commenting in all the examples on the new site.

Continue improving `ajax-and-forms`

@ConnorMontgomery's improvements have been really useful, but this can probably use even more fleshing out. This could include some of the following improvements:

  • "Ajaxifying" existing forms
  • Form Plugin - to follow up the discussion in #38, I actually think it's worthwhile to show how the plugin can be useful in doing the above ("ajaxification") and how doing so provides a considerably more familiar flow to form authoring than just serializing data and shoving it off to a url you type into your JS: (eg. $.post("form_process.php", $form.serialize())
  • Serialzing a form to an object (https://raw.github.com/cowboy/jquery-misc/master/jquery.ba-serializeobject.js, explain why this is left out of core (http://bugs.jquery.com/ticket/11002))
  • Augmenting a form's data during a submit handler (for both traditional and AJAX submissions)
  • Client side validation (all these changes might merit moving "validation" into its own article)
    • discuss how to leverage native techniques before just defaulting to using JS.
    • using a validation framework (jQuery Validation or a hand-rolled one) (in order to keep yourself from having the same phoneNumberRegex or whatever similar actual validation logic dupliated throughout your app)
    • use of native validation APIs ?
    • collecting and displaying client side errors (good vs. bad UX)
    • Using deferreds to incorporate AJAX-validation of form data on the client side with client-side only checks

Stylistically, we should also move away from overly effusive phraseology ("extremely easy") and do our best to keep the tone focused on how it works, not how you'll feel as a user.

In addition, we should move the section on prefilters as per #62.

Slideshow exercise counters aren't updated in manual mode

Via Abdul Popoola, the counters in the slideshow exercise do not update when manipulating the slideshow manually. His proposed fix is below:

/*

Move the #slideshow element to the top of #main.

Write code to cycle through the list items inside the element;
fade one in, display it for a few seconds, then fade it out and
fade in the next one.

When you get to the end of the list, start again at the beginning.

Add a counter under the slideshow (2 of 3, etc.) $.fn.prevAll

Add buttons under the counter that let you take manual control
of the slideshow and stop the automatic animation.

*/


$('h1').html('new html').attr()


$(document).ready(function() {
    var timeout, manualMode = false,

        $slideshow = $('#slideshow').prependTo('#main'),

        $counter = $('<div/>').insertAfter($slideshow),

        $controls = $('<div/>').insertAfter($slideshow),

        $prevBtn = $('<input/>', {
            type : 'button',
            value : 'previous'
        }).appendTo($controls),

        $nextBtn = $('<input/>', {
            type : 'button',
            value : 'next'
        }).appendTo($controls),

        $items = $slideshow.find('li').hide(),

        total = $items.length,

        updateCounter = function(num) {
            $counter.text(num + ' of ' + total);
        },

        getItem = function($item, trav) {
            var $returnItem = $item[trav]();
            return $returnItem.length ?
                $returnItem :
                $items[(trav == 'next') ? 'first' : 'last']();
        },

        showItem = function($currentItem, $itemToShow) {
            var $itemToShow =
                $itemToShow || getItem($currentItem,'next');

            $currentItem.fadeOut(500, function() {
                $itemToShow.fadeIn(500, fadeCallback);
            });

        },

        fadeCallback = function() {


            var $this = $(this),

                num = $this.prevAll().length + 1;

            // update the counter
            updateCounter(num);
                        if (manualMode) { return; }
                        $next = getItem($this, 'next'),
            // set the timeout for showing
            // the next item in 5 seconds
            timeout = setTimeout(function() {
                showItem($this, $next);
            }, 5000);
        },

        handleBtnClick = function(e) {
            clearTimeout(timeout);

            manualMode = true;


            var $currentItem = $items.filter(':visible'),
                $itemToShow = getItem($currentItem, e.data.direction);

            showItem($currentItem, $itemToShow);
        };

    $prevBtn.bind('click', { direction : 'prev' }, handleBtnClick);
    $nextBtn.bind('click', { direction : 'next' }, handleBtnClick);

    $items.eq(0).fadeIn(500, fadeCallback);
});

JavaScript 101 - Why is this on the site?

Taking a first glance at the site, the JavaScript 101 seems... out of place and imho really doesn't even belong on the site.

I think that it's understood that anyone getting into jQuery should know the basics of JavaScript first. It's just a simple prerequisite. First of all, most people who visit the site are going to know they need to know basic JavaScript ahead of time. So we are going to end up with this JavaScript 101 section that needs maintenance even though the far majority of visitors won't even use it.

And in the case that someone doesn't know JavaScript is a prereq to jQuery, then perhaps it just needs to be stated at the beginning of the tutorials what jQuery is and that knowing basic JavaScript is necessary, perhaps with a few links to point people in the right direction...

Playing the devils advocate, perhaps we should also put up a section on HTML 101 so people can learn about the DOM before trying to manipulate it via jQuery? Maybe also have a Browsers 101, Computers 101, How to use the Mouse and Keyboard 101? :-)

I feel like if this is a site about learning jQuery, it should be a site about learning jQuery. Not learning jQuery and everything leading up to jQuery.

This is all obviously my opinion and it's up to the project leaders. Just a suggestion!

Change "Getting Started" to "About jQuery"

The content that's here currently has been migrated from http://docs.jquery.com. The rest of the relevant content will be migrated to the learning site, and at that point, this section will be more of an overview of the history of the library, related libraries, and FAQs (similar to what's under "Getting Started" and "About jQuery at the current docs site.)

Add "mime-types" to dependencies.

I had to install the mime-types gem before the nanoc autocompile would work, so that should probably be added to the dependency list.

Improving JavaScript 101 Section

The JavaScript 101 section seems a bit out of order in it's current state. It is also missing a few important sections, some being referenced in current sections and others not, but should be. I was thinking about moving things around, but figured I would ask for some feedback before doing so. Below is a rough outline of how IMO it should be organized. Appreciate any feedback!

  1. syntax
    • overview with links to sections, etc.
    • needs to be built out more, its pretty bare
    • note importance of understanding the basics of vanilla JS, because jQuery is still JS. :-)
  2. reserved words
    • possibly include links to mozilla docs if we have them for each keyword.
    • make note about future reserved/java key words, don't want anyone going on a wild goose chase trying to find
      which browser implements all these java keywords.
  3. types
    • primitive
    • objects
    • arrays
    • testing type
  4. operators
    • current stuff, plus a link to type conversions when referenced
  5. conditionals
    • current stuff, plus a link to type conversions when referenced
  6. loops
    • current stuff
  7. type conversions
    • be nice to have a table of type conversions
  8. truthy and falsy
    • this is referenced in articles but is not written.
  9. functions
    • declarations
    • expressions
    • anonymous
    • immediate
  10. scope
    • current stuff
  11. closures
    • current stuff
  12. "this"
    • current stuff
  13. continued reading
    • links to solid articles for more learning

nanoc compile fails

I did a fresh checkout of master branch and "nanoc compile" fails resulting in the output folder never updating. It works in other branches (tested live and 2wordpress)

In master, nanoc watch produces....

nanoc watch -V

Watcher started; compiling the entire site...

Captain! We’ve been hit!

=== MESSAGE:

TypeError: can't convert String into Hash

=== COMPILATION STACK:

(empty)

I think it's probably related to the Rules file but perhaps someone else already knows how to solve this. I'm also new to nanoc so sorry if this is a noob question.

Wrong code in the Custom event chapter

.bind('turnOff', function(e) {
$(this).removeClass('off').addClass('on');
});

This should be

.bind('turnOff', function(e) {
$(this).removeClass('on').addClass('off');
});

Merge `ajax/key-concepts` and `ajax/jquery-ajax-methods` into a more narrative Getting Started

In addition to addressing @addyosmani's points below, I think ultimately these two pages belong as a single unit, with much less re-documentation of APIs

http://stage.learn.jquery.com/ajax/key-concepts/

  • Where are all the examples? $.get()? $.post()? etc. A lot of methods are mentioned but as a beginner I would hope to see examples too. This is where we need to either move over examples currently in the API docs or form a bridge between both resources.
  • I would expect/hope to see tutorials here - either in a separate entry or in key concepts. Based on what we have, a reader would appreciate that $.ajax() does a lot, but I think this is where we should be educating them further.
  • Consider covering typical tasks (some of which the API docs do): how do I consume a JSON data feed from an external/local source? worth showing a twitter API example? xml for those still using it?
  • We currently don't have a mention of deferreds at all. 6 months ago I would have said it's considered a more advanced topic, but given just how much power it has to improve the way people approach XHR, should this also be covered here? -- YES.
  • JSON is a "key concept" but probably should be its own article

http://stage.learn.jquery.com/ajax/jquery-ajax-methods/

  • Again we have nowhere near enough examples. We mention lots of options - perhaps it would be useful going through how to use them?. Don't have to cover everything but give people some snippets to help them 'grok' how it all fits together
  • I think we need to decide how much we rely on the API docs site for our examples. Right now we're trying to push people to look there for examples and narrative (via links), but I think the docs site should cover a) how to use methods, b) gotchas with perhaps some more of the narrative being in the learning site. Thoughts?

Update to reflect changes since jQuery 1.5

There have been a number of changes to jQuery since the current version of jQuery Fundamentals was written and I think that we need to try composing a list of these changes so we're as up to date as possible.

Off the top of my head, the areas that need to be addressed are:

Deferreds (see issue #3 - Eric has given us permission to use his blog post for this). I believe Dan also wrote some interesting animation pieces related to it that might be useful to absorb.

Subclassing (not really subclassing..but .sub(). I remember doing a screencast about this, but can write something if needed).

props/attributes changes - does jQF mention attribute usage where prop should be used instead? Do we want to write something up about how these should be used given a lot of people still confuse them on the bug tracker? If so, this is by far the best thread on this topic that I've found and I'd be interested in expanding one of the better answers into a page http://stackoverflow.com/questions/5874652/prop-vs-attr

Callbacks (1.7 - depends on when we aim to release. If needed use my post)

(I'll update the rest of this list as I remember what's changed. Going back through the blog posts atm).

Correction to Part III - Append New Content Outside Loop

Example using createDocumentFragment should be as follows:

// better: do this
var frag = document.createDocumentFragment();

$.each(myArray, function (i, item) {
    var newListItem = document.createElement("li");
    newListItem.textContent = item;
    frag.appendChild(newListItem);
});
$('#ballers')[0].appendChild(frag);

Add `ajax/what-and-why` to capture some context about using Ajax

I think @liamks improvements to the main overview content (which now lives at ajax/dex.md are really solid. However, I think we should add a separate article's with @addyosmani's suggestions from #38 (below) to give people some fuller context.

  • What is ajax? (more complete technical explanation). I don't think we're properly explaining just how much it can change how a developer looks at the flow of data in an application. Remember that we're talking about educating beginners (and later tackling advanced userS). More questions to address: why would I want to use Ajax? How does it help me?
  • What's the problem with implementing Ajax without jQuery? Why is it more painful? (to a newcomer, a code snippet for how to implement this cross-browser vs using jQuery could perhaps be shown). This would definitely help them appreciate the benefits of abstraction.

Improve traversing section

Original ticket:

The traversing section is extremely brief and not that informative; it's an area that students in my online class struggled with, and the book's not a great resource as it stands.

and here's a direct link to the traversing section:

https://github.com/jquery/web-learn-jquery-com/blob/master/content/jquery-fundamentals/jquery-basics/traversing.md

Notes:

Many of the existing posts by others I've found on traversing while doing a cursory search for this ticket don't appear to be that comprehensive. It might be easier for us to write out something a little more complete from scratch as it shouldn't take long.

Anyone want to tackle it?

JS101 Improvements

From a high-level, this is good since code can (sometimes) communicate quicker and more directly than words explaining that code. However, it feels like a lot of the sections in JavaScript101 could use some supporting text (and page structure - to make it more palatable, like <h3>'s, paragraph breaks, etc...). The ones in particular are:


What are people's thoughts on stuff like this? Should we use more text to explain it? I think so, but would love some other opinions (esp those on the jQuery team).

If you all agree, I'd be happy to rock out first versions of revisions.

Clarify that Function.bind example will not work in many browsers

Function.bind is mentioned in the following locations:

https://github.com/jquery/web-learn-jquery-com/blob/master/content/javascript-101/closures.md
https://github.com/jquery/web-learn-jquery-com/blob/master/content/javascript-101/this-keyword.md (actual example)

As per the ticket subject, we should probably expand on this to cover the fact it won't work in older browsers.

May integrate some of the MDC compatibility notes here as a part of this: https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/bind

Plugin section content discussion

I've been looking through the section on writing plugins. The content, especially A Plugin Development Pattern seems rather technical/in-depth for a beginner's guide. Anybody have any thoughts on how technical we'd like to get and what topics should be covered?

I would be happy to rewrite the section myself if that's okay.

My humble opinion: This section should focus on how to write a plugin, what tasks should be extracted into a plugin, common plugin pitfalls, plugin best practices, and information on using the upcoming plugin site, and not focus on how plugins work behind the scenes.

Content-review: jQuery Basics

Content discussion

The learning site needs to be an authoritative source of information for learning most of the common tasks developers use jQuery for. I believe that's the end goal we're after with this project. Right now, however, although the content we have sat well in the context of jQuery Fundamentals, it is no-where near comprehensive enough to match what our goals are with the site. (we're finding this as we read through the sections again - see #38 for one example)

It came up in a recent call, but I'd like to discuss just how much the API docs might influence the content in the learning site. Over time, the quantity of narrative we've seen go into the API docs has increased and I believe it might be of mutual benefit to discuss how we can both tackle our problem of content (and help avoid overflow in the docs site at the same time).

For example, I would expect the API docs to cover detailed information about methods, a few examples and of course, gotchas. Beyond that perhaps any narrative that seeks to teach developers how to use a feature (including code snippets, tutorials etc) should perhaps be in the learning site. We can then cross-reference content to avoid a significant amount of duplication and ensure users have a clear path of where to a) learn about a feature and b) get API reference for it.

We can (and will) of course probably continue to seek the integration of well written blog posts about API features the learning site covers in there, but when it comes to features like say..$.ajax(), I've seen nothing as comprehensive as what we have in the API docs at the moment. If we feel that it would make more sense for the learning site to merely be an introduction to features, that's fine too, but it would be useful for us to get a consensus.

Adam mentioned us someday covering building serious applications with jQuery and if/where it fits in there and in that respect, I guess the learning site might become something like our own MDN. It would be great to hear from others about their thoughts on what the learning site should be (content wise) and where it might (or should) sit with respect to the API docs site.

//cc @ajpiano @danheberden @dmethvin @kswedberg

Solution For Handling Exercises

This is a discussion on how we aim to handle integrating the jQuery fundamentals exercises as a part of the new learning site.

On our last call we discussed a few options including having a gist/repo to jsFiddle hook (similar to what @divya/nimbupani previously mentioned) so that exercises can be maintained under source control but still offer the benefits of fiddle editing for those that wish to play around with the code examples.

If we did opt to go down that path, there are few different questions we need to answer like:

How are these going to be presented to the end user? - having access to both gists and fiddles means that we could either opt to embed gists (which come with GitHub forkability) vs embedded fiddles (which can be forked and run live).

My personal view is that the fiddles offer more value here for embeds, but this comes with an added reliance on jsFiddle.com staying live. As many of us know, the service has been prone to periods of large downtime/slowness lately and I think we need to consider the pro's of what the service allows us to do vs. the possibility of pages hanging waiting on fiddles to load up.

A possible solution to this is using something (embedded gists, js syntax highlighted code samples) to display code samples on pages and then just a jsFiddle link (generated based on the hook) below the sample so that users can play with it if they want to. This would avoid any hanging issues.

I'd like to hear what others thing about these ideas. Would the last point offer the best balance? If not, do you have any alternative suggestions?

Fix non-working links

There are numerous non-working links:

  • the top horizontal menu
  • the presentations and books links near the footer
  • all of the footer links at the bottom
  • the links in the dropdowns in the top right
  • the links in the top left

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.