/    Sign up×
Community /Pin to ProfileBookmark

alternating row colors with alternating images

Hi,

I’m trying to create a table using css and javascript to have alternate row colors and buttons (the background corners of the buttons to blend in with the row background, so I’m using two button images). I’ve found several scripts on alternating row colors, but nothing on how to add an image (in this case, a button)to the last table cell in each alternate row. And by being new to javascript, I’ve been trying to figure out how to do this on my own by trial and error. (oh, adding the alternateimage function is my attempt, the first function is by the person who wrote the script so it follows very well with the “colors” in the top section of the CSS code.)

Here is the javascript code:

[CODE]
<script language=”javascript” type=”text/javascript”>

<!–

function alternatecolor(id){
if(document.getElementsByTagName){
var table = document.getElementById(id);
var rows = table.getElementsByTagName(“tr”);
for(i = 0; i < rows.length; i++){
if(i % 2 == 0){
rows[i].className = “color_one”;
}else{
rows[i].className = “color_two”;
}
}
}
}

function alternateimage(id){
if(document.getElementsByTagName){
var table = document.getElementById(id);
var cells = table.getElementByTagName(“td”);
for(x = 0; x < cells.length; i++){
if(x % 2 == 0){
cells[x].className = “firstRow”;
}else{
cells[x].className = “altRow”;
}
}
}
}
// –>
</script>
[/CODE]

Here’s the CSS code:

[CODE]
<style type=”text/css”>
<!–
.tableheader {
color: #ffffff;
background-color: #000000;
}
.color_one {
color: #000000;
background-color: #cccccc;
}
.color_two {
color: #ffffff;
background-color: #eeeeee;
}

.firstRow {
background-image: url(images/btn_results_ndx_dk.gif);
background-repeat: no-repeat;
background-position: left;
}

.altRow {
background-image: url(images/btn_ch_delete_ndx_lt.gif);
background-repeat: no-repeat;
background-position: left;
}

–>
</style>
[/CODE]

Here’s the HTML:

[CODE]
<body onload=”alternatecolor(‘alter_rows’); alternateimage(‘alter_rows’);”>

<table width=”90″ border=”0″ cellpadding=”0″ cellspacing=”0″ id=”alter_rows”>
<tr class=”tableheader”>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

</body>
[/CODE]

It’s totally screwed and I’m trying different javascripts and css for this effect, but this one looked like the simplest (as far as alternating the colors).

If you don’t mind helping me out, or directing me to a good tutorial, for what it’s worth, you have my sincerest thanks.

Carmen

to post a comment
JavaScript

15 Comments(s)

Copy linkTweet thisAlerts:
@toicontienJul 05.2007 — The JavaScript:
[CODE]function alternatecolor(id){
if(document.getElementById) {
var table = document.getElementById(id);
for (i = 0, end = table.rows.length; i < end; i++) {
table.rows[i].className = i % 2 == 0 ? "rowA" : "rowB";
}
}
}[/CODE]

The CSS:
[CODE]
.tableheader {
color: #fff;
background-color: #000;
}
.rowA {
color: #000;
background: #ccc url(images/btn_results_ndx_dk.gif) no-repeat scroll 0 50%;
}
.rowB {
color: #fff;
background: #eee url(images/btn_ch_delete_ndx_lt.gif) no-repeat scroll 0 50%;
}[/CODE]
Copy linkTweet thisAlerts:
@chqdznauthorJul 05.2007 — Thanks toicontien!

I'm sure I'm not coding this right because now the images show up in each cell, I just want the image (along with the appropriate background color) to display in the third (last)tablecell of each row (there are 3 cells in each row). Right now, every cell has a button in it, although the colors are alternating correctly. This could be b/c I may have pasted your javascript & css incorrectly or calling the function wrong in the body onload event in the html. Please take a look:

Javascript:

[CODE]
<script language="javascript" type="text/javascript">
<!--

function alternatecolor(id){
if(document.getElementsByTagName){

var table = document.getElementById(id);

var rows = table.getElementsByTagName("tr");

for(i = 0; i < rows.length; i++){

if(i % 2 == 0){
rows[i].className = "color_one";
}else{
rows[i].className = "color_two";
}

}
}
}


function alternatecolor(id){
if(document.getElementById) {
var table = document.getElementById(id);
for (i = 0, end = table.rows.length; i < end; i++) {
table.rows[i].className = i % 2 == 0 ? "rowA" : "rowB";
}
}
}

// -->
</script>

[/CODE]



CSS:

[CODE]
.tableheader {
color: #ffffff;
background-color: #000000;
}
.color_one {
color: #000000;
background-color: #cccccc;
}
.color_two {
color: #ffffff;
background-color: #eeeeee;
}



.rowA {
color: #000;
background: #ccc url(images/btn_results_ndx_dk.gif) no-repeat scroll 0 50%;
}
.rowB {
color: #fff;
background: #eee url(images/btn_ch_delete_ndx_lt.gif) no-repeat scroll 0 50%;
}
[/CODE]




HTML:
[CODE]
<body onload="alternatecolor('alter_rows');">

<table width="500" border="0" cellpadding="0" cellspacing="0" id="alter_rows">
<tr class="tableheader">
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

</body>
[/CODE]
Copy linkTweet thisAlerts:
@Orc_ScorcherJul 05.2007 — All you have to do is mark the last cell in each row as 'special' by setting its classname. You can either do that manually in your HTML or let JavaScript do it for you:function alternatecolor(id){
if(document.getElementsByTagName){ <br/>
var table = document.getElementById(id); <br/>
var rows = table.getElementsByTagName("tr");
for(i = 0; i &lt; rows.length; i++){ <br/>
if(i % 2 == 0){
rows[i].className = "color_one";
}else{
rows[i].className = "color_two";
} [color=green]
var cells = rows[i].cells
cells[cells.length - 1].className = "lastCell"[/color]
}
}
}
Finally you have to modify your CSS selectors:[color=green].color_one .lastCell[/color] {
background-image: url(images/btn_results_ndx_dk.gif);
background-repeat: no-repeat;
background-position: left;
}

[color=green].color_two .lastCell[/color] {
background-image: url(images/btn_ch_delete_ndx_lt.gif);
background-repeat: no-repeat;
background-position: left;
}
Copy linkTweet thisAlerts:
@chqdznauthorJul 05.2007 — Thanks Orc Scorcher! I will try that! I must make a correction. I had two functions with the same name in the javascript, I thought that was the problem, so I deleted the first one (mine), that didn't change anything, but I wanted to mention that.
Copy linkTweet thisAlerts:
@chqdznauthorJul 05.2007 — WOW, THANK YOU BOTH VERY MUCH!

Orc Scorcher, that's exactly what I wanted to do, and I understand what is going on in the javascript as well now. It has taken me over 3 days to find an answer on how to do this. I've been reading Javascript: A Beginner's Guide by John Pollock too. Any other good books out there?

If anyone is interested, Stylin' for CSS by Charles Wyke-Smith is a great book to learn CSS.

Again, thanks to BOTH toicontien and Orc Scorcher -- you guys are AWESOME!

Carmen

A grateful poster
Copy linkTweet thisAlerts:
@chqdznauthorJul 05.2007 — Well, I'm back...

The js and css are working as coded. My problem now is I don't want the image in the last cell of the table header row (first row). How would you code in js and css for this?

Many thanks --
Copy linkTweet thisAlerts:
@toicontienJul 05.2007 — Give the alternatecolor() function the Id of a TBODY tag. You need to start writing semantic tables too.
[code=html]<table cellpadding="0" cellspacing="0" border="0">
<thead>
<tr>
<th id="th_myheader">Table header</th>
</tr>
</thead>
<tbody id="mytbody">
<tr>
<td headers="th_myheader">Table cell</td>
</tr>
</tbody>
</table>
<script type="text/javascript">
<!-- begin hiding
alternatecolor('mytbody');
// end hiding -->
</script>[/code]
Copy linkTweet thisAlerts:
@chqdznauthorJul 05.2007 — .....[I]Carmen risking the chance of being laughed at or worse [/I]....

Thanks toicontien, I was using the <thead> and <tbody> tags in my code. I like your idea, but could you define the new IDs and classes in css, as well as the javascript (if anything add'l is being added)?

Here's my HTML table:
[CODE]
<div id="data" >
<table class="data" width="100%">
<thead>
<th width="15" align="left">&nbsp;</th>
<th align="left" width="300">Name</th>
<th align="left" width="80">Alias</th>
<th align="left" width="275">Location</th>
<th align="left" colspan="2">Email</th>
</thead>
<tbody>
<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center">&nbsp;</td>
</tr>

<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center">&nbsp;</td>
</tr>
<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center" >&nbsp;</td>
</tr>
</tbody>
</table>
</div>

[/CODE]


The Javascript:
[CODE]
function alternatecolor(id){
if(document.getElementsByTagName){

var table = document.getElementById(id);

var rows = table.getElementsByTagName("tr");
for(i = 0; i < rows.length; i++){

if(i % 2 == 0){
rows[i].className = "color_one";
}else{
rows[i].className = "color_two";
}

var cells = rows[i].cells
cells[cells.length - 1].className = "lastCell"
}
}
}
[/CODE]


The CSS:
[CODE]

<style type="text/css">
<!--

table.data thead tr { background-color: #99abc0; }

.color_one {
color: #000000;
background-color: #e7f0f4;
}
.color_two {
color: #ffffff;
background-color:#D1D8DB;
}

.color_one .lastCell {
background-image: url(images/btn_results_ndx_lt.gif);
background-repeat: no-repeat;
background-position: left;
}

.color_two .lastCell {
background-image: url(images/btn_results_ndx_dk.gif);
background-repeat: no-repeat;
background-position: left;
}

-->
</style>
[/CODE]


As a last resort, I was thinking of using a div display:inline to create the header titles of the table and just having the data table in that div. I haven't tried that yet, and I need the table to line up with that "titles" div exactly to have the "look" of one table. I don't know. I don't know javascript yet, and I'm learning css...

Carmen
Copy linkTweet thisAlerts:
@toicontienJul 05.2007 — The markup:
[code=html]<div id="data" >
<table class="data" width="100%">
<thead>
<th width="15" align="left">&nbsp;</th>
<th align="left" width="300">Name</th>
<th align="left" width="80">Alias</th>
<th align="left" width="275">Location</th>
<th align="left" colspan="2">Email</th>
</thead>
<tbody id="color_these_rows">
<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center">&nbsp;</td>
</tr>
<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center">&nbsp;</td>
</tr>
<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center" >&nbsp;</td>
</tr>
</tbody>
</table>
</div>
<script type="text/javascript">
<!-- begin hiding
alternatecolor('color_these_rows');
// end hiding -->
</script>[/code]

The CSS:
.tableheader {
color: #fff;
background-color: #000;
}
.rowA td {
color: #000;
background: #ccc none no-repeat scroll 0 50%;
}
.rowB td {
color: #fff;
background: #eee none no-repeat scroll 0 50%;
}

.rowA td.firstCell,
.rowB td.firstCell {
background-image: url(images/btn_results_ndx_dk.gif);
}

.rowA td.lastCell,
.rowB td.lastCell {
background-image: url(images/btn_ch_delete_ndx_lt.gif);
}

The JavaScript:
function alternatecolor(id){
if(document.getElementById) {
var table = document.getElementById(id);
for (i = 0, end = table.rows.length; i &lt; end; i++) {
table.rows[i].className = i % 2 == 0 ? "rowA" : "rowB";
table.rows[i].cells[0].className = "firstCell";
table.rows[i].cells[table.rows[i].cells.length - 1].className = "lastCell";
}
}
}
Copy linkTweet thisAlerts:
@chqdznauthorJul 06.2007 — Hey toicontien, thanks for taking the time to write all that! I very much appreciate it. I've created a new page with just your code in it. The only thing is that I'm no longer seeing the alternate row colors or the buttons. I got a js error prompt from IE, saying:

[CODE]
[COLOR="Blue"]Line: 13
Char: 10
Error: 'rows.length' is null or not an object
Code: 0
URL: file://c:local_texthwprojtestToicontien.html
[/COLOR]
[/CODE]



Does "rows" need to be declared? I'm guessing here of course -- I tried pasting code this in:

[CODE]
[B][COLOR="Navy"]var[/COLOR][/B] rows [COLOR="Blue"]=[/COLOR] table.getElementsByTagName ([COLOR="blue"]"tr"[/COLOR]);
[/CODE]


*(Code also shown in [COLOR="Red"]red[/COLOR] in the code below)*


But that didn't change anything. I noticed that the "[I]color_these_rows[/I]" <tbody>id is missing in the CSS, could that be causing a problem?

I've included the entire coded page that I copied from your response:

[CODE]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="screen.css" rel="stylesheet" type="text/css">
[COLOR="Blue"]<script language="javascript" type="text/javascript" >

<!--
function alternatecolor(id){
if(document.getElementById) {
var table = document.getElementById(id);
[COLOR="Red"]var rows = table.getElementsByTagName("tr"); // I added this, you can delete[/COLOR]
for (i = 0, end = table.rows.length; i < end; i++) {
table.rows[i].className = i % 2 == 0 ? "rowA" : "rowB";
table.rows[i].cells[0].className = "firstCell";
table.rows[i].cells[table.rows[i].cells.length - 1].className = "lastCell";
}
}
}

//-->
</script>[/COLOR]

[COLOR="Magenta"]
<style>
.tableheader {
color: #fff;
background-color: #000;
}
.rowA td {
color: #000;
background: #ccc none no-repeat scroll 0 50%;
}
.rowB td {
color: #fff;
background: #eee none no-repeat scroll 0 50%;
}

.rowA td.firstCell,
.rowB td.firstCell {
background-image: url(images/btn_results_ndx_dk.gif);
}

.rowA td.lastCell,
.rowB td.lastCell {
background-image: url(images/btn_ch_delete_ndx_lt.gif);
}
</style>
[/COLOR]
</head>



<body onLoad="javascript:alternatecolor('data')";>
<div id="background">
<div id="backgroundBorder">
<div class="subHeaderDetail">
<div id="data" >

<table class="data" width="100%">
<thead>
<th width="15" align="left">&nbsp;</th>
<th align="left" width="300">Name</th>
<th align="left" width="80">Alias</th>
<th align="left" width="275">Location</th>
<th align="left" colspan="2">Email</th>
</thead>
[B][COLOR="Black"]<tbody id="color_these_rows">[/COLOR][/B]
<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center">&nbsp;</td>
</tr>
<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center">&nbsp;</td>
</tr>
<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center" >&nbsp;</td>
</tr>
</tbody>
</table>

</div>

</div>
</div>
</div>
</body>
</html>

[/CODE]


I'll also try to write a "color_these_rows" style rule using the colors and images and see if that works.

I appreciate more of your help!

thx

C
Copy linkTweet thisAlerts:
@chqdznauthorJul 06.2007 — IT WORKS!!! YIPPEE!!

First, [B]A MILLION THANKS [/B] to Toicontien and Orc Scorcher for their expertise and PATIENCE! You guys are an answer to prayer! (yes, I was praying to God for help ? )

I added two lines to the function and one to the CSS (in [COLOR="Red"]red[/COLOR] ) just trying different things. I wound up using Orc Scorcher's code, but that takes NOTHING away from Toicontien -- who stayed with me to the bitter -- but successful -- END.

I'm placing the entire code here for any one who wants to use it.

[CODE]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<head>
<title>Profile</title>
<link href="screen.css" rel="stylesheet" type="text/css">

<script language="javascript" type="text/javascript">

<!--


function alternatecolor(id){
if(document.getElementsByTagName){

var table = document.getElementById(id);

var rows = table.getElementsByTagName("tr");
[COLOR="red"]var title = table.getElementsByTagName("th");[/COLOR]
for(i = 0; i < rows.length; i++){

if(i % 2 == 0){
rows[i].className = "color_one";
}else{
rows[i].className = "color_two";
}

var cells = rows[i].cells
cells[cells.length - 1].className = "lastCell"

[COLOR="red"]title[title.length - 1].className = "firstCell"[/COLOR]
}
}
}

// -->
</script>

<style type="text/css">
<!--

table.data thead tr { background-color: #99abc0; }

[COLOR="red"]thead th .firstCell { background-color: #99abc0; }[/COLOR]

.color_one {
color: #000000;
background-color: #e7f0f4;
}
.color_two {
color: #ffffff;
background-color:#D1D8DB;
}

.color_one .lastCell {
background-image: url(images/btn_results_ndx_lt.gif);
background-repeat: no-repeat;
background-position: left;
}

.color_two .lastCell {
background-image: url(images/btn_results_ndx_dk.gif);
background-repeat: no-repeat;
background-position: left;
}

-->
</style>


</head>

<body onLoad="javascript:alternatecolor('data')";>
<div id="background">
<div id="backgroundBorder">
<div class="subHeaderDetail">


<div id="data" >
<table class="data" width="100%">
<thead>
<th width="15" align="left">&nbsp;</th>
<th align="left" width="300">Name</th>
<th align="left" width="80">Alias</th>
<th align="left" width="275">Location</th>
<th align="left" colspan="2">Email</th>
</thead>
<tbody>
<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center">&nbsp;</td>
</tr>

<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center">&nbsp;</td>
</tr>

<tr>
<td width="15"><input type="checkbox" /></td>
<td width="300">&nbsp;</td>
<td width="80">&nbsp;</td>
<td width="275">&nbsp;</td>
<td width="145">&nbsp;</td>
<td width="78" align="center" >&nbsp;</td>
</tr>
</tbody>
</table>
</div>

</div>

</div>
</div>

</body>
</html>

[/CODE]


God bless you, guys! Expect good blessings (or good karma) to come your way!!!

Carmen

A grateful poster
Copy linkTweet thisAlerts:
@toicontienJul 06.2007 — My code will work, you need to change the onload attribute in the BODY tag:
&lt;body onload="alternatecolor('[B]color_these_rows[/B]')";&gt;
I was assuming you'd change the Id of the TBODY to "data", or change the Id passed to the alternatecolors function. The alternatecolors function takes the Id of a TABLE, THEAD, TBODY or TFOOT tag. Since you were giving it "data" and there was no HTML tag with "data" for an Id, Internet Explorer was giving you an error.

By the way, the value of the onload attribute should not have "javascript:" in it. The browser assumes it's javascript.
Copy linkTweet thisAlerts:
@chqdznauthorJul 06.2007 — Hey Toicontien,

Thanks for more information! It's a long learning process and I'm trying to learn this on my own. I'm in school, yes, but we haven't gotten any where near what I was trying to do.

BTW, I never said your code didn't work. Before I wrote my last post, I asked you if you could tell me what I was doing wrong (specifically where to put the "color_these_rows" id), because I KNEW it must have been something I was doing, or something that was left out from all the code you so graciously typed in. Since you now tell me where to put the <tbody> id "color_these_rows", I'm sure your code will work, but that info was not given in your response to me. As such, I just tried and tried different things to see if I could help myself in case you or anybody else was not around to help or this post got buried among so many others -- which I hope it doesn't because imho this is GREAT reusable code!

At any rate, please accept my apology if I offended you. Again, I never said your code did not work.

Many thanks to you for all your help. I'm sure I will need it again!

Carmen
Copy linkTweet thisAlerts:
@toicontienJul 06.2007 — Oh, no. ? Never thought you said my code doesn't work. It was more a note for the future. This thread had two solutions running at once, and you never know who will stumble upon this stuff in the future. Happy coding!
Copy linkTweet thisAlerts:
@chqdznauthorJul 06.2007 — Ok, Toicontien, glad to hear that! You are right, there was a LOT of code on this page -- whew! I just wanted to make everything as clear and as easy as I could (wish I could post screenshots!) because I NEED the details in order to understand what I'm doing ?

Anyways, that is why I put the full code in my last post. Hopefully, that will help other people if they want to do this type of data display.

Thanks again!

[I][COLOR="Blue"]C[/COLOR][/I]
×

Success!

Help @chqdzn spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 4.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...