12. Ajouter à la fin du body


#1

Hey,

my code is just the same as yours, and i think it's correct. Yet, CA won't let me pass to the next exercise, how did you do ?

Thanks !


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

Hi,

Paste in your code so we can have a look


#3

Sure, here it is :

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

I've read all topics about this exercise but can't figure out how to pass... i'm getting this answer after testing my code "Oups, try again, Please follow the instructions on the Full Preview page to test your code."


#4

This is the french lesson ? This exercise ?

Please paste in your HTML as well


#5

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:

In HTML

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

In CSS

//change
#button{
//to:
#bouton{

In jQuery

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

#6

Oh, it was just a french/english pb, i should have thought of that !

Sorry, and thanks for your quick answer, it works fine now !