title: Add/Delete Button
body: <p>I'm working on this project, and what it is supposed to do is show a series of "business cards" that contain the name of someone and their image.  When you hover over the card an x button appears and clicking it will delete the card from the page.  There are also to inputs one for the url of an image and another for the name of the person, under these 2 inputs are a submit button, and when it's submitted it's supposed to create the card.  </p>
  
  <p>Right now I have the code to create the card, but it does not appear to be working.</p>
  
  <pre><code>    document.getElementById('btn').onclick = function() {
          var addPhoto = document.getElementById('imagename').value,
          src = addPhoto +'.png',
          img = document.createElement('img');
          img.src = src;
  
          var addName =document.getElementById('actorname').value;
  
  
      var card = document.createElement('div');
   card.setAttribute('class','card');
  
   var title = document.createElement('h1');
   container.innerHTML = addName;
  
  var cardImage = document.createElement('div');
  cardImage.setAttribute('class','card-image');
  
   var img = document.createElement('img');
  image.setAttribute('src',addPhoto);
  
  var button = document.createElement('input');
  button.setAttribute('class','buttons');
  button.setAttribute('type','image');
  button.setAttribute('src','img/close.png');
  
  card.appendChild(title);
  card.appendChild(cardImage);
  cardImage.appendChild(image);
  cardImage.appendChild(button);
  document.getElementById("lefty").appendChild(card);
  };
  </code></pre>