Exercise 12. "Ajouter à la fin du body" - correct code does not pass - Workaround




My code seems to work on this one, all elements are added on the bottom (it's in red).
Soooo, why the heck does the SCT won't let me pass ? I can spam click the add button with and without things on the input. It doesn't do anything.

Error message : Oops try again. Please follow the instructions on the Full Preview page to test your code.

$(document).ready(function() {
        var aAjouter = $('input[name=checkListItem]').val();
        $('.list').append('<div class="item">' + aAjouter + '</div>');

I didn't touch anything else.


Oh well, I just pass with a code who got a SyntaxError.
You should patch this exercice.


3 posts were split to a new topic: 12. Ajouter à la fin du body


This lesson expects you to click on #buoton and we have it set to #button thus it doesn't work,

What you need to do:


<!-- Change --> <div id="button">Add!</div>
<!-- To: --> <div id="bouton">Add!</div>



In jQuery

$('#button').click(function() {
// to