Note that there are some explanatory texts on larger screens.

plurals
  1. POObject #<HTMLDivElement> has no method 'empty'
    primarykey
    data
    text
    <p>I'm so confuse with this. I'm using jquery 1.9.1 to append a div's inner html to another div. But when trying to debug with chrome developer tools, it gave me this error inside jquery library. </p> <p>my Html:</p> <pre><code>&lt;body&gt; &lt;s:form action="/save" method="POST"&gt; &lt;div class="educationForm"&gt; &lt;div class="educations"&gt; &lt;label&gt;Position&lt;/label&gt; &lt;input type="text" name="educations[0].index" value="1" /&gt; &lt;br/&gt; &lt;label&gt;School&lt;/label&gt; &lt;input type="text" name="educations[0].school" /&gt; &lt;br/&gt; &lt;label&gt;Degree&lt;/label&gt; &lt;input type="text" name="educations[0].degree" /&gt; &lt;br/&gt; &lt;label&gt;GPA&lt;/label&gt; &lt;input type="text" name="educations[0].scored" /&gt; &lt;br/&gt; &lt;label&gt;Start Date&lt;/label&gt; &lt;input type="text" name="educations[0].startDate" /&gt; &lt;br/&gt; &lt;label&gt;End Date&lt;/label&gt; &lt;input type="text" name="educations[0].endDate" /&gt; &lt;br/&gt; &lt;/div&gt; &lt;/div&gt; &lt;a href="#" id="addButton"&gt;Add new Edu&lt;/a&gt; &lt;input type="submit" value="Save" /&gt; &lt;/s:form&gt; &lt;div class="template_educations" style="display:none"&gt; &lt;div class="educations"&gt; &lt;label&gt;Position&lt;/label&gt; &lt;input type="text" name="educations[_X_].index" /&gt; &lt;br/&gt; &lt;label&gt;School&lt;/label&gt; &lt;input type="text" name="educations[_X_].school" /&gt; &lt;br/&gt; &lt;label&gt;Degree&lt;/label&gt; &lt;input type="text" name="educations[_X_].degree" /&gt; &lt;br/&gt; &lt;label&gt;GPA&lt;/label&gt; &lt;input type="text" name="educations[_X_].scored" /&gt; &lt;br/&gt; &lt;label&gt;Start Date&lt;/label&gt; &lt;input type="text" name="educations[_X_].startDate" /&gt; &lt;br/&gt; &lt;label&gt;End Date&lt;/label&gt; &lt;input type="text" name="educations[_X_].endDate" /&gt; &lt;br/&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; </code></pre> <p>My js:</p> <pre><code>$(document).ready(function(){ $("#addButton").click(function(event){ event.preventDefault(); $(".educationForm").append($(".template_educations").html); $(".educationForm").children(".educations").last().children("input").each(function(){ var count = $(".educationForm").children(".education").length(); var value = $(this).attr("name"); value.replace("_X_", count + 1); $(this).attr("name", value); }); }); }); </code></pre> <p>Please help me determine whether this is a bug in jquery library or there's something wrong with my code, since i didn't use any function <code>empty</code> inside my code</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload