title: jQuery: Replace attr value placeholder with user input from text input
body: <p>Using <code>.replaceWith()</code> and <code>.val()</code> I was able to replace the title but when trying to access the <code>placeholder</code> <code>.attr()</code> of the input, I am unable to replace it. Here is what I have:</p>
  
  <pre><code>&lt;p class="title"&gt;Title&lt;/p&gt;
  &lt;p&gt;&lt;input class="placeholder" type="text" placeholder="Placeholder" disabled /&gt;&lt;/p&gt;
  &lt;p&gt;&lt;input class="newText" type="text" /&gt;&lt;/p&gt;
  &lt;p&gt;&lt;input class="newPlaceholder" type="text" /&gt;&lt;/p&gt;
  &lt;p&gt;&lt;input type="button" class="button" title="button" /&gt;&lt;/p&gt;
  
  $("input.button").click(function(){
      var newText = $("input.newText").val();
      $("p.title").replaceWith(newText);
  
      var newPlaceholder = $("input.newPlaceholder").val();
      $("input.placeholder").attr("placeholder").replaceWith(newPlaceholder);
  });
  </code></pre>
  
  <p><a href="https://jsfiddle.net/CoderLevel1/fmk39yko/23/" rel="nofollow">JSFiddle</a></p>