Clear out the Status Box - 4/9


#1

Step 4/9 - Clear out the Status Box of Interactive Website : status update

I seriously can't find the error. I've scoured the forum and can't find a solution! help! The error is the same "Oops, try again. Remember to add code for $('.status-box').val(''); inside your $('.btn').click() function."


var main = function() {

$(".btn").click(function() {
    var post = $(".status-box").val();
    $("<li>").text(post).prependTo(".posts");
    $(".status-box").val('');

});
    
};

$(document).ready(main);


#2

swap out all of your double quotes " " for single quotes ' '


#3

thank you! i tried swapping those out yesterday but for some reason couldn't get it to work, but it does now!


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.