Bitwise AND operator
To alternate the table background color:
rows [i].className = ((rows [i].index & 1) == 1) ? "alt" : "";
To alternate the table background color:
rows [i].className = ((rows [i].index & 1) == 1) ? "alt" : "";
Posted by Ginger at 9:59 AM
Labels: Javascript, operator
No comments:
Post a Comment