|
Post by Mark Knight Day on Aug 31, 2011 5:06:02 GMT
if(td[x].width == "20%" && td[x].getElementsByTagName("center")[0]) {
What does that mean?
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Aug 31, 2011 5:07:17 GMT
If the variables td and x's width equals 20% and td and x are centered do the following.
Basically what it means.
|
|
|
Post by Mark Knight Day on Aug 31, 2011 5:07:59 GMT
Ohh wow. Man you need to write another tutorial.
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Aug 31, 2011 5:08:34 GMT
I am thinking of writing another one now I have more time
|
|
Jordan
Elite Poster
[M:5000]
Posts: 286
|
Post by Jordan on Aug 31, 2011 18:40:20 GMT
If the variables td and x's width equals 20% and td and x are centered do the following. Basically what it means. It doesn't check to see if the cell is centered because the center tag only contains the avatar and contact icons. It just checks to see if a center element exists within the cell. If you wanted to see if the cell was centered, you'd do: if(td[x].align == "center") td[x].getElementsByTagName("center") returns an array of references to all the center tags in the cell, and by adding [0], we grab the first center element of that array (which should be the only one). If it doesn't exist, the statement become false and the if statement fails. Another way of writing this is: td[x].getElementsByTagName("center")[0] != "undefined" If there is no center element, then we know we are not in the mini-profile cell.
|
|
Cam
Administrator
[M:5000]
Posts: 6,381
|
Post by Cam on Aug 31, 2011 20:55:43 GMT
Yeah that's kinda what I meant. Said it wrong.
|
|