Note that there are some explanatory texts on larger screens.

plurals
  1. POCollapsible table bug jquery
    primarykey
    data
    text
    <p>I'm trying to make a collapsible panel. The code below is the closest I got with my table, but when I collapse it in and out again, the <code>&lt;td&gt;</code>'s show stacked (only happens in Firefox) and in Chrome the data <code>&lt;td&gt;</code>'s aren't the right width after collapsed.</p> <p>Also is it possible to make an image repeatedly switch? Like an green dot in the name table when collapsed and a red dot when closed?</p> <p>Here is the code:</p> <pre><code>&lt;?php include "config/tabelwidth.php"; ?&gt; &lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.js"&gt;&lt;/script&gt; &lt;script type="text/javascript"&gt; $(document).ready(function() { $("tr.header").click(function () { $("tr.child", $(this).parent()).slideToggle("fast"); $("td.subs", $(this).parent()).slideToggle("fast"); }); }); &lt;/script&gt; &lt;table border="1px" width="&lt;?php echo $width."px"?&gt;"&gt; &lt;tr class="header"&gt; &lt;td width="&lt;?php echo $width1."px"?&gt;"&gt;naam&lt;/td&gt; &lt;td width="&lt;?php echo $width2."px"?&gt;" class="subs"&gt;subs&lt;/td&gt; &lt;td width="&lt;?php echo $width3."px"?&gt;" class="subs"&gt;subs&lt;/td&gt; &lt;td width="&lt;?php echo $width4."px"?&gt;" class="subs"&gt;subs&lt;/td&gt; &lt;/tr&gt; &lt;tr class="child"&gt; &lt;td width="&lt;?php echo $width1."px"?&gt;"&gt;data1&lt;/td&gt; &lt;td width="&lt;?php echo $width2."px"?&gt;"&gt;data2&lt;/td&gt; &lt;td width="&lt;?php echo $width3."px"?&gt;"&gt;data3&lt;/td&gt; &lt;td width="&lt;?php echo $width4."px"?&gt;"&gt;data4&lt;/td&gt; &lt;/tr&gt; &lt;/table&gt; </code></pre> <p><strong>EDIT</strong>:</p> <p>ok so updating my jQuery worked!:)</p> <p>I really love to see those helpful people here, seems jQuery is a really nice thing to learn ^^</p> <p>If I may ask where did you guys learn jQuery?</p> <p>Finally last part of my question.. </p> <p>let's say I want an image of an arrow pointing down (name: arrowdown) when collapsed, if hided the arrow is pointing right (name: arrowright) how'd you guys fix that one? ;o :)</p>
    singulars
    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.
 

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