Submission- threadly

48 views
Skip to first unread message

Jon S

unread,
Jan 10, 2016, 12:36:20 PM1/10/16
to Codecademy Projects Help Forum
Any comments on my JS code:

var main = function() {
  $('form').submit(function() {
    var comment = ("#comment").val();
    if(comment !== "") {
      var html = $('<li>').text(comment);
    else{var html = $('<li').prependTo(comment);
    };
    #comment.clear();


  });
};

$(document).ready(main);
Reply all
Reply to author
Forward
0 new messages