Note that there are some explanatory texts on larger screens.

plurals
  1. POJquery apending <tr> to table closing the <tr> tag unexpectedly
    text
    copied!<p>I am using jquery <code>append</code> method to add <code>&lt;tr&gt;</code> inside the <code>&lt;tbody&gt;</code>. I have to get the following table structure</p> <pre><code>&lt;table&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt; &lt;div&gt; &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td width="33%"&gt;&lt;/td&gt; &lt;td width="4%"&gt;:&lt;/td&gt; &lt;td width="63%"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;td&gt; &lt;div&gt; &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td width="33%"&gt;&lt;/td&gt; &lt;td width="4%"&gt;:&lt;/td&gt; &lt;td width="63%"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;td&gt; &lt;div&gt; &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td width="33%"&gt;&lt;/td&gt; &lt;td width="4%"&gt;:&lt;/td&gt; &lt;td width="63%"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt; &lt;div&gt; &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td width="33%"&gt;&lt;/td&gt; &lt;td width="4%"&gt;:&lt;/td&gt; &lt;td width="63%"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;td&gt; &lt;div&gt; &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td width="33%"&gt;&lt;/td&gt; &lt;td width="4%"&gt;:&lt;/td&gt; &lt;td width="63%"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;td&gt; &lt;div&gt; &lt;table width="100%" border="0" cellspacing="0" cellpadding="0"&gt; &lt;tr&gt; &lt;td width="33%"&gt;&lt;/td&gt; &lt;td width="4%"&gt;:&lt;/td&gt; &lt;td width="63%"&gt;&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; &lt;/div&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; </code></pre> <p>I have to add a class to <code>&lt;tr&gt;</code> and inside its contents dynamically. And i am doing it via jquery append method. But the problem is that when appending the <code>&lt;tr&gt;</code> after appending the first <code>&lt;td&gt;</code> the <code>&lt;tr&gt;</code> is getting closed. I need to insert three <code>&lt;td&gt;</code> inside <code>&lt;tr&gt;</code> and close that. So what's wrong with this code?</p>
 

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