title: Textarea placeholder with a checkbox
body: <p>I'm trying to change the placeholder of a textarea with the press of a checkbox button. I just can't get it to change.</p>
  <p>To be clear, I'm trying to set a placeholder NOT a value.</p>
  <p>My textarea:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;textarea name=&quot;problem&quot; id=&quot;problem&quot; rows=&quot;3&quot; class=&quot;form-control&quot; cols=&quot;45&quot; placeholder=&quot;Describe your ticket reason in as few words as possible.&quot;&gt;&lt;/textarea&gt;
  </code></pre>
  <p>My JavaScript:</p>
  <pre class="lang-html prettyprint-override"><code>&lt;div class=&quot;onoffswitch&quot;&gt;
    &lt;input type=&quot;checkbox&quot; onchange=&quot;changeplh()&quot; name=&quot;onoffswitch&quot; class=&quot;onoffswitch-checkbox&quot; value=&quot;1&quot; id=&quot;myonoffswitch&quot; checked&gt;
    &lt;label class=&quot;onoffswitch-label&quot; for=&quot;myonoffswitch&quot;&gt;
      &lt;span class=&quot;onoffswitch-inner&quot;&gt;&lt;/span&gt;
      &lt;span class=&quot;onoffswitch-switch&quot;&gt;&lt;/span&gt;
    &lt;/label&gt;
    &lt;script&gt;
      function changeplh() {
        debugger;
        var sel = document.getElementById(&quot;myonoffswitch&quot;);
        var textbx = document.getElementById(&quot;problem&quot;);
        var indexe = sel.selectedIndex;
  
        if (indexe == 0) {
          $(&quot;#problem&quot;).val('');
          $(&quot;#problem&quot;).prop(&quot;placeholder&quot;, &quot;age&quot;);
  
        }
        if (indexe == 1) {
          $(&quot;#problem&quot;).val('');
          $(&quot;#problem&quot;).prop(&quot;placeholder&quot;, &quot;name&quot;);
        }
      }
    &lt;/script&gt;
  &lt;/div&gt;
  </code></pre>
  <p>What I specifically need - a checkbox button that changes a placeholder of a textarea to 2 different options.
  EX: Click it once, it says &quot;age&quot;, click it again it says &quot;name&quot;, click it again it says &quot;age&quot; etc.</p>