I'm trying to add `li` element to `ul` list. But after i open page source, i can't see that my DOM was updated. Here is the code bellow. I can't delete element also.... When i click on delete button nothing happens.

```
   var msg       = $('#danger').hide();
   var inputText = $('#todo');
   //var list      = $('#list');
   var globalObj;

   //general function that will call other functions
   function addListElement(event)
   {
       event.preventDefault();
       var input = inputText.val();
       if( input == '')
       {
           msg.show();
       }
       else
       {
           msg.hide();
           addCookie(input);
           readCookie();
       }

   }
    //function for adding value to cookie
    function addCookie(inputValue)
    {
        globalObj = {text: ''+ inputValue+''};
        $.cookie('vesko', '' +  globalObj.text + '');

    }
    // function for reading cookie
    function readCookie()
    {
        var listCookie = $.cookie('vesko');

        $('#list').after('<li><input type="checkbox">' + listCookie + '<button class="delete">Delete</button></li>');
    }

   $(function (){
       $('#add').on('click', addListElement);
       $('.delete').on('click', function(){
         $('.delete').parent().remove();
       });
   });

<div class="container-fluid">

  <div class="row">
   <div class="col-md-8">
    <h1> <strong> Todo app</strong></h1>
    <div class="alert alert-danger" id="danger" role="alert"><strong>Please type something in the field!</strong></div>
     <form action="" method="" class="form-inline">
      <div class="form-group">
       <div class="input-group">
        <div class="input-group-addon"><span class="glyphicon glyphicon-floppy-save"></span></div>
         <input type="text" class="form-control" name="todo" id="todo" placeholder="Type Something">
       </div>
      </div>
      <button type="submit" id="add"  class="btn btn-primary">Add ToDo Task</button>

     </form>
   </div>
  </div>
  <br><br><br>
  <!-- row for ul list elements -->
  <div class="row">
   <div class="col-md-5">
    <ul id="list">
    </ul>
   </div>
  </div>

</div>

```