Add change handler to each added checkbox.

One problem was that the change handlers for the input checkbox were being set inside of the document.ready handler.  That means that the input checkboxes only got their behavior once, when the page was first loaded.  Of course, there were no input checkboxes on the page at that time.

What we do now is to assign the change behavior inside of the submit button's submit handler.  That way, we add a checkbox and then assign its change behavior then.

Careful, though:  In my first attempt to do this, I just tried to reassign the change handler to all the checkboxes, thinking that I'd replace the change handlers and it'd be no big deal.  I did:

                $('#theList li input.check').change(function(){
                  $(this).siblings().toggleClass('strike');
                });

It turns out that adding a new handler to an event doesn't overwrite the old one; it adds to it.  So, when I added a second item to the list, that would get the change handler, and the first item would get a second change handler added.  That meant that when you clicked the first item, it'd fire both change handlers.  The first would toggle the strike class and the second would toggle it back.

Therefore, we add the .last() in there, to make sure we're only adding this handler to the item we just added to the list.

                $('#theList li input.check').last().change(function(){
                  $(this).siblings().toggleClass('strike');
                });

Oh, also:  In the change handler, we previously did a search for $('.item2').  $('.item2') matches all the '.item2's on the whole page.  That's not what we want.  We want to find just the .item2 that's next to the checkbox that was just clicked.

The checkbox that was just clicked is sotred in 'this', since that was the receiver of the 'change' event.  But it's a bare DOM object, not a jquery object.  So we have to wrap it like so:  $(this).  That gives us a jquery object for the checkbox that was checked.  Then, .siblings() gives us the .item2 that's next to the checkbox.