title: error on javascript dom appendChild
body: <pre><code>$.each($('#income_ranges').children(), function(key, value) {
    var field_row = value.getElementsByTagName("input");
  
    $.each(field_row, function(key, value) {
      if(value.value == "") {
          value.appendChild("&lt;div&gt; cant be blank &lt;/div&gt;");
      }
    })
  })
  </code></pre>
  
  <p>I want to append the following div to value but i get an error stating that value.appendChild is not a function. </p>
  
  <p>in my code value is a HTMLInputElement and i want to input the div just below the element but i get that annoying error. </p>
  
  <pre><code>&lt;input class="string required" id="lender_dsr_max_threshold_income_ranges_attributes_1437717712398_income_range" name="lender_dsr_max_threshold[income_ranges_attributes][1437717712398][income_range]" type="text"&gt;
  </code></pre>
  
  <p>Any help is deeply appreciated</p>