Using jquery to hide table rows created with repeater
<p>I have a created a table with the repeater, im using itemtemplate and alternatingtemplate.
The item template creates the <strong>tabelrow tag</strong> and the alternating template closes the <strong>tablerow tag</strong>.</p>

<p>Here's an example(I will provide the code further down)<br>
Cells 1 to 3 is created by itemtemplate and 4 to 6 with alternating template.</p>

<p>Cells 1 - 3 has data_id 5 <br>
Cells 4 - 6 has data_id 2<br>
Next row <br>
Cells 1 - 3 has data_id 7<br>
Cells 4 - 6 has data_id 3<br></p>

<p>Looking like this
Created first loop with repeater<br>
|<em>Cell1</em>|_Cell2_|<em>Cell3</em>|_Cell4_|<em>Cell5</em>|_Cell6_|<br>
Created second loop with repeater<br>
|<em>Cell1</em>|_Cell2_|<em>Cell3</em>|_Cell4_|<em>Cell5</em>|_Cell6_|<br></p>

<p>End result
|<em>Cell1</em>|_Cell2_|<em>Cell3</em>|_Cell4_|<em>Cell5</em>|_Cell6_|
|<em>Cell1</em>|_Cell2_|<em>Cell3</em>|_Cell4_|<em>Cell5</em>|_Cell6_|</p>

<p>My questions is that I want too hide certain TD's with Jquery. Let's say I want to hide all TD with data-id= 2, that would be cells 4 to 6 first row.</p>

<p>How can I accomplish that without breaking the table structure, best would be to move everything like this.</p>

<p>Get rid of cells 4 to 6 first row</p>

<p>|<em>Cell1</em>|_Cell2_|<em>Cell3</em>|_Cell4_|<em>Cell5</em>|_Cell6_|<br>
|<em>Cell1</em>|_Cell2_|<em>Cell3</em>|_Cell4_|<em>Cell5</em>|_Cell6_|</p>

<p>This is what it looks after removal for me..
<br>
|<em>Cell1</em>|_Cell2_|<em>Cell3</em>|<br>
|<em>Cell1</em>|_Cell2_|<em>Cell3</em>|_Cell4_|<em>Cell5</em>|_Cell6_|</p>

<p>I want it to look like this<br>
|<em>Cell1</em>|_Cell2_|<em>Cell3</em>||<em>Cell1</em>|_Cell2_|<em>Cell3</em>|<br>
|<em>Cell4</em>|_Cell5_|<em>Cell6</em>|</p>

<p>Is that even possible?</p>

<p>Here's my code..</p>

<pre><code>    &lt;asp:Repeater ID="Repeater1" runat="server"&gt;
    &lt;HeaderTemplate&gt;

    &lt;table cellspacing="0"&gt;
    &lt;thead&gt;
    &lt;tr&gt;
     &lt;th scope="col" abbr="Sidor/Artiklar" class="nobg"&gt;Sidor/Artiklar&lt;/th&gt;
     &lt;th scope="col" abbr="Dual 1.8GHz"&gt;MozRank&lt;/th&gt;
     &lt;th scope="col" abbr="Dual 1.8GHz"&gt;PR&lt;/th&gt;
     &lt;th scope="col" abbr="Dual 1.8GHz"&gt;Fri tillgång&lt;/th&gt;
     &lt;th scope="col" abbr="Dual 2GHz"&gt;30 Artiklar(1 om dagen)&lt;/th&gt;
     &lt;th scope="col" colspan="2" abbr="Dual 2.5GHz"&gt;Välj själv&lt;/th&gt;
     &lt;th scope="col" abbr="Sidor/Artiklar" class="nobg"&gt;Sidor/Artiklar&lt;/th&gt;
     &lt;th scope="col" abbr="Dual 1.8GHz"&gt;MozRank&lt;/th&gt;
     &lt;th scope="col" abbr="Dual 1.8GHz"&gt;PR&lt;/th&gt;
     &lt;th scope="col" abbr="Dual 1.8GHz"&gt;Fri tillgång&lt;/th&gt;
     &lt;th scope="col" abbr="Dual 2GHz"&gt;30 Artiklar(1 om dagen)&lt;/th&gt;
     &lt;th scope="col" colspan="2" abbr="Dual 2.5GHz"&gt;Välj själv&lt;/th&gt;
    &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;/HeaderTemplate&gt;

     &lt;AlternatingItemTemplate&gt;

    &lt;th scope="row" class="spec"&gt;&lt;%# DataBinder.Eval(Container.DataItem, "namn_domain")%&gt; &lt;/th&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt; 
    &lt;%# DataBinder.Eval(Container.DataItem, "moz_domain")%&gt;
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt; 
    &lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;       
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt; 
    &lt;input type='&lt;%# DataBinder.Eval(Container.DataItem, "type_domain")%&gt;' name='&lt;%# DataBinder.Eval(Container.DataItem, "idtag_domain")%&gt;' value='&lt;%# DataBinder.Eval(Container.DataItem, "faccess_domain")%&gt;' onclick="calculatePrice();disableTB(this.name);" /&gt; "Fri tillgång" 
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt;
    &lt;input type="radio" name='&lt;%# DataBinder.Eval(Container.DataItem, "idtag_domain")%&gt;' value='&lt;%# DataBinder.Eval(Container.DataItem, "monthly_domain")%&gt;' onclick="calculatePrice();disableTB(this.name);" /&gt; "En artikel om dagen (30/mån)"
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt;
    &lt;input type="radio" name='&lt;%# DataBinder.Eval(Container.DataItem, "idtag_domain")%&gt;' value="0"  onclick="calculatePrice();enableTB(this.name, this.checked)" /&gt;  "Skriv ditt antal själv"
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt;
    &lt;input type="text"  name='&lt;%# DataBinder.Eval(Container.DataItem, "moz_domain")%&gt;' id='&lt;%# DataBinder.Eval(Container.DataItem, "idtag_domain")%&gt;'  Enabled="false" Width="40px" onkeyup="calculatePrice()" style="background-color:#eeeeee" /&gt; 
    &lt;/td&gt;

    &lt;/tr&gt;
    &lt;/AlternatingItemTemplate&gt;

    &lt;ItemTemplate&gt;


    &lt;tr&gt;

    &lt;th scope="row" abbr="Model" class="spec"&gt;&lt;%# DataBinder.Eval(Container.DataItem, "namn_domain")%&gt;   &lt;/th&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt;
    &lt;%# DataBinder.Eval(Container.DataItem, "moz_domain")%&gt;
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt;
    &lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;       
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt;
    &lt;b&gt;&lt;/b&gt;
    &lt;input type='&lt;%# DataBinder.Eval(Container.DataItem, "type_domain")%&gt;' name='&lt;%# DataBinder.Eval(Container.DataItem, "idtag_domain")%&gt;' value='&lt;%# DataBinder.Eval(Container.DataItem, "faccess_domain")%&gt;' onclick="calculatePrice();disableTB(this.name);" /&gt; "Fri tillgång" 
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt;  
    &lt;input type="radio" name='&lt;%# DataBinder.Eval(Container.DataItem, "idtag_domain")%&gt;' value='&lt;%# DataBinder.Eval(Container.DataItem, "monthly_domain")%&gt;' onclick="calculatePrice();disableTB(this.name);" /&gt; "En artikel om dagen (30/mån)"
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt; 
    &lt;input type="radio" name='&lt;%# DataBinder.Eval(Container.DataItem, "idtag_domain")%&gt;' value="0"  onclick="calculatePrice();enableTB(this.name, this.checked)" /&gt;  "Skriv ditt antal själv"
    &lt;/td&gt;
    &lt;td class="alt" data_id='&lt;%# DataBinder.Eval(Container.DataItem, "pr_domain")%&gt;'&gt;
    &lt;input type="text"  name='&lt;%# DataBinder.Eval(Container.DataItem, "moz_domain")%&gt;' id='&lt;%# DataBinder.Eval(Container.DataItem, "idtag_domain")%&gt;'  Enabled="false" Width="40px" onkeyup="calculatePrice()" style="background-color:#eeeeee" /&gt; 
    &lt;/td&gt;



    &lt;/ItemTemplate&gt;
    &lt;FooterTemplate&gt;
    &lt;/table&gt;
    &lt;/FooterTemplate&gt;
    &lt;/asp:Repeater&gt;
</code></pre>

<p>This is my jquery, just messing about getting to understand the function, so this code is obviously not the correct<br>
    function hidetd() {</p>

<pre><code>for(var i = 0; i &lt; 2; i++) {
    $("[data_id=" + i + "]").hide();
}
}
</code></pre>
