$(function(){
  updateStatus();
});

var interactiveUpdate = function(id,update) {
  var idparam = '.'+ id + ' ul li:first-child';

  // insert new list onto the first child of ul and hide it
  $(idparam).before('<li style="display:none;">'+update+'</li>');

  // display the hidden first child using jQuery's effect slideDown()
  $(idparam).slideDown("slow");
}

var updateStatus = function() {
  // Set the event if the button is pushed

  $('input[name="example-update-status-1422"]').click(function() {

    // grab the status
    var stat = $('textarea[name="example-status-1422"]').val();

    // call the interactUpdate snippet
    interactiveUpdate('example-the-feed-1422',stat);
  });
} 

