Lesson 3 : create a new post


#1


https://www.codecademy.com/en/courses/web-beginner-en-hk5qh/0/3?content_from=make-an-interactive-website%3Ajquery-dom-manipulation
Uncaught TypeError: $(...).text(...).preprendTo is not a function
The message doesn't show up after I pressed the Post button


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

$(document).ready(main);


#2

@boardcoder26033,

Have a close look at

preprendTo

http://api.jquery.com/prependto/