Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #23370 > unrolled thread
| Started by | "Mel Smith" <med_cutout_syntel@aol.com> |
|---|---|
| First post | 2014-03-03 16:57 -0700 |
| Last post | 2014-03-06 23:24 +0100 |
| Articles | 20 on this page of 51 — 11 participants |
Back to article view | Back to comp.lang.javascript
Reversing the rows of a table ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-03-03 16:57 -0700
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-04 01:15 +0100
Re: Reversing the rows of a table ?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-03 16:19 -0800
Re: Reversing the rows of a table ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-03-03 17:31 -0700
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-04 01:36 +0100
Re: Reversing the rows of a table ?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-03 18:51 -0800
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-04 08:57 +0100
Re: Reversing the rows of a table ?? Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2014-03-04 09:13 +0100
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-04 09:49 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-04 12:16 +0100
Re: Reversing the rows of a table ?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-04 06:37 -0800
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-04 15:56 +0100
Re: Reversing the rows of a table ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-03-04 09:10 -0700
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-04 17:56 +0100
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-04 21:47 +0100
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-04 22:38 +0100
Re: Reversing the rows of a table ?? "Mel Smith" <med_cutout_syntel@aol.com> - 2014-03-04 15:46 -0700
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-05 00:18 +0100
Re: Reversing the rows of a table ?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-04 16:17 -0800
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-05 09:06 +0100
Re: Reversing the rows of a table ?? Christoph Michael Becker <cmbecker69@arcor.de> - 2014-03-05 17:49 +0100
Re: Reversing the rows of a table ?? Christian Winter <thepoet_nospam@arcor.de> - 2014-03-05 06:50 +0100
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-05 09:07 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-05 16:42 +0100
Re: Reversing the rows of a table ?? Christian Winter <thepoet_nospam@arcor.de> - 2014-03-06 07:28 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-06 10:58 +0100
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-06 11:11 +0100
Re: Reversing the rows of a table ?? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-03-06 10:35 -0300
Re: Reversing the rows of a table ?? "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-04 11:06 -0800
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-04 20:22 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-04 20:55 +0100
Re: Reversing the rows of a table ?? ompalompasales2@gmail.com - 2014-03-04 12:59 -0800
Re: Reversing the rows of a table ?? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-03-05 23:05 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-05 23:42 +0100
Re: Reversing the rows of a table ?? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-03-06 14:57 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-06 22:37 +0100
Re: Reversing the rows of a table ?? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-03-06 23:04 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-06 23:20 +0100
Re: Reversing the rows of a table ?? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-03-06 23:31 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-07 00:30 +0100
Re: Reversing the rows of a table ?? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-03-07 18:10 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-07 22:49 +0100
Re: Reversing the rows of a table ?? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-03-06 19:21 -0300
Re: Reversing the rows of a table ?? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-03-06 23:41 +0100
Re: Reversing the rows of a table ?? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-03-06 22:45 -0300
Re: Reversing the rows of a table ?? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-03-05 23:47 +0100
Re: Reversing the rows of a table ?? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-03-06 14:57 +0100
Re: Reversing the rows of a table ?? Denis McMahon <denismfmcmahon@gmail.com> - 2014-03-05 23:41 +0000
Re: Reversing the rows of a table ?? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2014-03-06 18:56 -0300
Re: Reversing the rows of a table ?? Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2014-03-06 23:18 +0100
Re: Reversing the rows of a table ?? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-03-06 23:24 +0100
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
| From | Christoph Michael Becker <cmbecker69@arcor.de> |
|---|---|
| Date | 2014-03-05 17:49 +0100 |
| Message-ID | <531755ae$0$6666$9b4e6d93@newsspool2.arcor-online.net> |
| In reply to | #23414 |
Evertjan. wrote: > "Michael Haufe (TNO)" <tno@thenewobjective.com> wrote on 05 mrt 2014 in > comp.lang.javascript: > >> On Tuesday, March 4, 2014 3:38:54 PM UTC-6, Evertjan. wrote: >> >> [...] >>> while (i) >>> tbody.insertBefore(tbody.removeChild(tr[--i]),null); >> [...] >> >> tbody.insertBefore(tr[--i],null); > > So the insert is a move? According to DOM Level 2[1]: | If the newChild is already in the tree, it is first removed. > [the before with a null being realy an after] [1] <http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-1950641247> -- Christoph M. Becker
[toc] | [prev] | [next] | [standalone]
| From | Christian Winter <thepoet_nospam@arcor.de> |
|---|---|
| Date | 2014-03-05 06:50 +0100 |
| Message-ID | <5316bb17$0$9517$9b4e6d93@newsspool1.arcor-online.net> |
| In reply to | #23409 |
Am 04.03.2014 22:38, schrieb Evertjan.: > tbody.insertBefore(tbody.removeChild(tr[--i]),null); Any partical reason why you use insertBefore here instead of the more idiomatic appendChild?
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2014-03-05 09:07 +0100 |
| Message-ID | <XnsA2E75CC245473eejj99@194.109.133.133> |
| In reply to | #23413 |
Christian Winter <thepoet_nospam@arcor.de> wrote on 05 mrt 2014 in comp.lang.javascript: > Am 04.03.2014 22:38, schrieb Evertjan.: >> tbody.insertBefore(tbody.removeChild(tr[--i]),null); > > Any partical reason why you use insertBefore here instead of > the more idiomatic appendChild? Indeed, appendChild was not in my mindset. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-03-05 16:42 +0100 |
| Message-ID | <3429820.aJejIuaNvK@PointedEars.de> |
| In reply to | #23413 |
Christian Winter wrote: > Am 04.03.2014 22:38, schrieb Evertjan.: >> tbody.insertBefore(tbody.removeChild(tr[--i]),null); > > Any partical reason why you use insertBefore here instead of “Are you looking for ‘particular’?” > the more idiomatic appendChild? More importantly, why remove the child node in the first place? -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Christian Winter <thepoet_nospam@arcor.de> |
|---|---|
| Date | 2014-03-06 07:28 +0100 |
| Message-ID | <53181571$0$6670$9b4e6d93@newsspool2.arcor-online.net> |
| In reply to | #23418 |
Am 05.03.2014 16:42, schrieb Thomas 'PointedEars' Lahn: > Christian Winter wrote: > >> Am 04.03.2014 22:38, schrieb Evertjan.: >>> tbody.insertBefore(tbody.removeChild(tr[--i]),null); >> >> Any partical reason why you use insertBefore here instead of > > “Are you looking for ‘particular’?” Why yes, I am, particularly :) >> the more idiomatic appendChild? > > More importantly, why remove the child node in the first place? And let's not forget about triggering reflows. On limited hardware there may be a noticeable difference between doing the resorting on a visible tbody, which (depending on browser implementation) may trigger up to 2 * (rowcount - 1) page reflows, and working on a document fragment, which will mean only two reflows (when removing and re-appending the tbody). This is, admittedly, not going to be a problem with the OP's 20 rows, but I feel it should be mentioned. -Chris
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-03-06 10:58 +0100 |
| Message-ID | <2032755.yFNCssulJW@PointedEars.de> |
| In reply to | #23434 |
Christian Winter wrote: > Am 05.03.2014 16:42, schrieb Thomas 'PointedEars' Lahn: >> Christian Winter wrote: >>> the more idiomatic appendChild? >> More importantly, why remove the child node in the first place? > > And let's not forget about triggering reflows. On limited hardware > there may be a noticeable difference between doing the resorting > on a visible tbody, which (depending on browser implementation) > may trigger up to 2 * (rowcount - 1) page reflows, and working on a > document fragment, which will mean only two reflows (when removing > and re-appending the tbody). This is, admittedly, not going to be a > problem with the OP's 20 rows, but I feel it should be mentioned. Non sequitur, see <news:5099043.qCXR8o4yzN@PointedEars.de> -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2014-03-06 11:11 +0100 |
| Message-ID | <XnsA2E871CE59F3Feejj99@194.109.133.133> |
| In reply to | #23434 |
Christian Winter <thepoet_nospam@arcor.de> wrote on 06 mrt 2014 in
comp.lang.javascript:
> And let's not forget about triggering reflows. On limited hardware
> there may be a noticeable difference between doing the resorting
> on a visible tbody, which (depending on browser implementation)
> may trigger up to 2 * (rowcount - 1) page reflows, and working on a
> document fragment, which will mean only two reflows (when removing
> and re-appending the tbody). This is, admittedly, not going to be a
> problem with the OP's 20 rows, but I feel it should be mentioned.
function swapTable(t) {
var tr = t.getElementsByTagName('tr');
var i = tr.length - 1;
while (i)
tr[0].parentNode.appendChild(tr[--i]);
};
There will be no repainting during this function's execution, methinks.
Anyway, showing verry large tables is just silly 99% of the time,
better make serverside select what you really want to see of a database,
and do an announced cutt off if there are more than xx rows.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Joao Rodrigues <groups_jr-1@yahoo.com.br> |
|---|---|
| Date | 2014-03-06 10:35 -0300 |
| Message-ID | <lf9ti3$8ba$1@speranza.aioe.org> |
| In reply to | #23436 |
Em 06/03/2014 07:11, Evertjan. escreveu:
> Christian Winter <thepoet_nospam@arcor.de> wrote on 06 mrt 2014 in
> comp.lang.javascript:
>
>> And let's not forget about triggering reflows. On limited hardware
>> there may be a noticeable difference between doing the resorting
>> on a visible tbody, which (depending on browser implementation)
>> may trigger up to 2 * (rowcount - 1) page reflows, and working on a
>> document fragment, which will mean only two reflows (when removing
>> and re-appending the tbody). This is, admittedly, not going to be
>> a problem with the OP's 20 rows, but I feel it should be
>> mentioned.
>
> function swapTable(t) { var tr = t.getElementsByTagName('tr'); var i
> = tr.length - 1; while (i) tr[0].parentNode.appendChild(tr[--i]); };
>
The swapTable() function is going to scramble the header, footer and
tbody sections of the table.
> There will be no repainting during this function's execution,
> methinks.
>
> Anyway, showing verry large tables is just silly 99% of the time,
> better make serverside select what you really want to see of a
> database, and do an announced cutt off if there are more than xx
> rows.
>
ACK.
--
Joao Rodrigues (J.R.)
[toc] | [prev] | [next] | [standalone]
| From | "Michael Haufe (TNO)" <tno@thenewobjective.com> |
|---|---|
| Date | 2014-03-04 11:06 -0800 |
| Message-ID | <f5178a42-c9c7-49ef-950d-99b6cd36e8fb@googlegroups.com> |
| In reply to | #23384 |
On Tuesday, March 4, 2014 8:56:40 AM UTC-6, Thomas 'PointedEars' Lahn wrote: > Michael Haufe (TNO) wrote: > You agreed with that assessment. I'm relatively certain Evertjan didn't say that either. > > I think you've misinterpreted what was written. > > If not the former four steps, what, then, do you understand to mean > "populate a different data structure and reverse it there before populating > the table"? Something different of course.
[toc] | [prev] | [next] | [standalone]
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
|---|---|
| Date | 2014-03-04 20:22 +0100 |
| Message-ID | <XnsA2E6CF3D53935eejj99@194.109.133.133> |
| In reply to | #23394 |
"Michael Haufe (TNO)" <tno@thenewobjective.com> wrote on 04 mrt 2014 in comp.lang.javascript: > On Tuesday, March 4, 2014 8:56:40 AM UTC-6, Thomas 'PointedEars' Lahn > wrote: >> Michael Haufe (TNO) wrote: > >> You agreed with that assessment. > > I'm relatively certain Evertjan didn't say that either. I, for one, cannot remember with any grade of certainty, what I did not say. -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-03-04 20:55 +0100 |
| Message-ID | <5062093.sszV56Q36p@PointedEars.de> |
| In reply to | #23394 |
Michael Haufe (TNO) wrote: > Thomas 'PointedEars' Lahn wrote: >> You agreed with that assessment. > > I'm relatively certain Evertjan didn't say that either. This kind of replying of yours is leading nowhere. You have said: >> > Evertjan is correct though that it would be wiser to populate a >> > different data structure and then reverse it there before populating >> > the table. So you have agreed to the assessment that „it would be wiser“ this way. What exactly, then, did you mean by 1. a different data structure 2. reverse it there 3. populate the table respectively? >> > I think you've misinterpreted what was written. >> >> If not the former four steps, what, then, do you understand to mean >> "populate a different data structure and reverse it there before >> populating the table"? > > Something different of course. That much is obvious. But what *exactly*? -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | ompalompasales2@gmail.com |
|---|---|
| Date | 2014-03-04 12:59 -0800 |
| Message-ID | <691eca7a-ab13-4f9f-9d84-2acf0f8a7db9@googlegroups.com> |
| In reply to | #23370 |
Want Ketamine? Buy today! Order Online Overnight, Ketamine Online Pharmacy, Order Ketamine Cod Overnight Delivery. Buy Ketamine Online Cod Only, Buy Ketamine Cod, Buy Ketamine Online With Mastercard. Buy Ketamine Online Cod, Order Ketamine Online, Legal Buy Ketamine Online ©2012-2013. Top Pharmacy List! Best Prices Online! Buy Ketamine® Online! ENTER HERE! ********************************************** . > http://ed.bestonlinefinn.net/?q=Ketamine < - BUY Ketamine® ONLINE, CLICK HERE! . . ********************************************** . > http://us.bestonlinefinn.net/?q=Ketamine < - BUY Ketamine® ONLINE, CLICK HERE! . . ********************************************** Buy Ketamine® Online Without A Prescription On Tuesday, March 4, 2014 12:57:21 AM UTC+1, Mel Smith wrote: > Hi: > > > > Enviro: > > A small table (usually less than twenty rows and always has six > > columns) > > > > Question: > > > > Is there a 'quickie' ES/JS way to reverse the rows of the table during > > the onload process? > > > > btw, this table is built at the server from a potentiually big database > > and is always subject to change. > > > > another btw, I *could* do this at the server, but it's a bit painful > > ... > > > > Thanks, > > -- > > Mel Smith
[toc] | [prev] | [next] | [standalone]
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
|---|---|
| Date | 2014-03-05 23:05 +0100 |
| Message-ID | <lf872i$lk5$4@dont-email.me> |
| In reply to | #23370 |
Mel Smith wrote:
[...]
> Question:
>
> Is there a 'quickie' ES/JS way to reverse the rows of the table during
> the onload process?
[...]
I would write it in that way:
function reverseTableRows(tableId) {
var table = document.getElementById(tableId),
newTbody = document.createElement('tbody'),
oldTbody = table.tBodies[0], // assuming one tbody HTML element
rows = oldTbody.rows,
i = rows.length - 1;
while (i >= 0) {
newTbody.appendChild(rows[i]);
i -= 1;
}
oldTbody.parentNode.replaceChild(newTbody, oldTbody);
}
Benefit of above is that there is only one reflow.
--
Cezary Tomczyk
http://www.ctomczyk.pl/
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-03-05 23:42 +0100 |
| Message-ID | <5099043.qCXR8o4yzN@PointedEars.de> |
| In reply to | #23426 |
Cezary Tomczyk wrote:
> Mel Smith wrote:
> [...]
>> Question:
>>
>> Is there a 'quickie' ES/JS way to reverse the rows of the table
>> during
>> the onload process?
> [...]
>
> I would write it in that way:
>
> function reverseTableRows(tableId) {
> var table = document.getElementById(tableId),
> newTbody = document.createElement('tbody'),
> oldTbody = table.tBodies[0], // assuming one tbody HTML element
> rows = oldTbody.rows,
> i = rows.length - 1;
>
> while (i >= 0) {
> newTbody.appendChild(rows[i]);
> i -= 1;
> }
> oldTbody.parentNode.replaceChild(newTbody, oldTbody);
> }
>
> Benefit of above is that there is only one reflow.
The same can be achieved more efficiently and in a less error-prone way by
hiding the table while appending rows backwards from the second-last row.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2
Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
|---|---|
| Date | 2014-03-06 14:57 +0100 |
| Message-ID | <lf9usr$til$3@dont-email.me> |
| In reply to | #23427 |
Thomas 'PointedEars' Lahn wrote: [...] > The same can be achieved more efficiently and in a less error-prone way by > hiding the table while appending rows backwards from the second-last row. Hiding table by using "display: none" before? -- Cezary Tomczyk http://www.ctomczyk.pl/
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-03-06 22:37 +0100 |
| Message-ID | <107248054.RBiIgZahLc@PointedEars.de> |
| In reply to | #23438 |
Cezary Tomczyk wrote: > Thomas 'PointedEars' Lahn wrote: > [...] >> The same can be achieved more efficiently and in a less error-prone way >> by hiding the table while appending rows backwards from the second-last >> row. > > Hiding table by using "display: none" before? Setting the “display” style property to "none" or the “visibility” style property to "hidden" before. -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
|---|---|
| Date | 2014-03-06 23:04 +0100 |
| Message-ID | <lfarck$2ui$1@dont-email.me> |
| In reply to | #23441 |
Thomas 'PointedEars' Lahn wrote: > Cezary Tomczyk wrote: [...] >> Hiding table by using "display: none" before? > > Setting the “display” style property to "none" or the “visibility” style > property to "hidden" before. I think that the "display" style property causing reflow while the "visibility" style property not. However, when the HTML element will have "visibility" style property set to "hidden" and then the content will be changed, but not size of this HTML element then reflow will not be done. Otherwise, reflow will be done. -- Cezary Tomczyk http://www.ctomczyk.pl/
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-03-06 23:20 +0100 |
| Message-ID | <9824302.i1AOTz3ZA6@PointedEars.de> |
| In reply to | #23444 |
Cezary Tomczyk wrote: > Thomas 'PointedEars' Lahn wrote: >> Cezary Tomczyk wrote: > [...] > >>> Hiding table by using "display: none" before? >> >> Setting the “display” style property to "none" or the “visibility” style >> property to "hidden" before. > > I think that the "display" style property causing reflow while the > "visibility" style property not. > > However, when the HTML element will have "visibility" style property set > to "hidden" and then the content will be changed, but not size of this > HTML element then reflow will not be done. Otherwise, reflow will be done. How did you get those ideas? -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
|---|---|
| Date | 2014-03-06 23:31 +0100 |
| Message-ID | <lfat0e$f0g$2@dont-email.me> |
| In reply to | #23446 |
W dniu 2014-03-06 23:20, Thomas 'PointedEars' Lahn pisze: > Cezary Tomczyk wrote: [...] >> I think that the "display" style property causing reflow while the >> "visibility" style property not. >> >> However, when the HTML element will have "visibility" style property set >> to "hidden" and then the content will be changed, but not size of this >> HTML element then reflow will not be done. Otherwise, reflow will be done. > > How did you get those ideas? When you set the "display" style property to "none" then it will change the structure of view and everything must be redraw again, right? Except, when when HTML element have a "position" style property set to "absolute" or "fixed". -- Cezary Tomczyk http://www.ctomczyk.pl/
[toc] | [prev] | [next] | [standalone]
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Date | 2014-03-07 00:30 +0100 |
| Message-ID | <2393625.qqABJlOREQ@PointedEars.de> |
| In reply to | #23449 |
Cezary Tomczyk wrote: > W dniu 2014-03-06 23:20, Thomas 'PointedEars' Lahn pisze: >> Cezary Tomczyk wrote: > [...] >>> I think that the "display" style property causing reflow while the >>> "visibility" style property not. >>> >>> However, when the HTML element will have "visibility" style property set >>> to "hidden" and then the content will be changed, but not size of this >>> HTML element then reflow will not be done. Otherwise, reflow will be >>> done. >> >> How did you get those ideas? > > When you set the "display" style property to "none" then it will change > the structure of view and everything must be redraw again, right? Depends on what you mean by “structure of the view”. > Except, when when HTML element have a "position" style property set to > "absolute" or "fixed". Reflow will happen in any case, see <https://developers.google.com/speed/articles/reflow>. -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 Please do not Cc: me. / Bitte keine Kopien per E-Mail.
[toc] | [prev] | [next] | [standalone]
Page 2 of 3 — ← Prev page 1 [2] 3 Next page →
Back to top | Article view | comp.lang.javascript
csiph-web