I was recently presented with this same challenge and stumbled on this thread but found a simpler solution using append...
var firstname = $('#firstname').val();
$('ol').append( '<li>' + firstname + '</li>' );
Store the firstname value and then use append
to add that value as an li
to the ol
. I hope this helps :)