Note that there are some explanatory texts on larger screens.

plurals
  1. POIE7 glitches with building tables cells dynamically
    text
    copied!<p>I am working on jQuery plugin. It building tables dynamically.</p> <pre><code>// ... ... var currentTBL = document.createElement('table'); $(currentTBL).attr('width', _width).attr('height', _height); var currZoneIndex = 0; for (var y = 0; y &lt; limitRow; y++) { var currentTR = document.createElement('tr'); var currentWidth = 0; for (var x = 0; x &lt; limitCol; x++) { if (!opts.matrix[y * limitCol + x]) continue; var currZone = opts.zones[currZoneIndex]; var cellSizes = getSizes(opts.zones[currZoneIndex]); currentTD = document.createElement('td'); $(currentTD) .attr('colspan', currZone.colspan) .attr('rowspan', currZone.rowspan) .attr('width', cellSizes.x) .attr('height', cellSizes.y); $(currentTR).append(currentTD); currZoneIndex++; } $(currentTBL).append(currentTR); } // ... ... </code></pre> <p>This part of code gives me a table object and It's HTML is:</p> <pre><code>&lt;TABLE width=470 height=150&gt; &lt;TR valign="top"&gt; &lt;TD height=48 width=107 colspan="1"&gt;&lt;/TD&gt; &lt;TD height=48 width=255 colspan="1"&gt;&lt;/TD&gt; &lt;TD height=48 width=108 colspan="1"&gt;&lt;/TD&gt; &lt;/TR&gt; &lt;TR valign="top"&gt; &lt;TD height=61 width=362 colspan="2"&gt;&lt;/TD&gt; &lt;TD height=61 width=108 colspan="1"&gt;&lt;/TD&gt; &lt;/TR&gt; &lt;TR valign="top"&gt; &lt;TD height=41 width=107 colspan="1"&gt;&lt;/TD&gt; &lt;TD height=41 width=255 colspan="1"&gt;&lt;/TD&gt; &lt;TD height=41 width=108 colspan="1"&gt;&lt;/TD&gt; &lt;/TR&gt; &lt;/TABLE&gt; </code></pre> <p>It looks normally with FF, Opera, Safari,..: IE7 || IE6 showing something like this:</p> <p><a href="http://rayz.ru/stackoverflow/original.gif" rel="nofollow noreferrer">http://rayz.ru/stackoverflow/original.gif</a></p> <p>I have a solution which re-paste table on the same place. But it breaks all kind of event handlers on my table. </p> <p>Please help me with solution. </p> <p><strong>Simplified plugin demo:</strong> <a href="http://rayz.ru/stackoverflow/test/" rel="nofollow noreferrer">http://rayz.ru/stackoverflow/test/</a></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