If statement with jquery
<p>I'm trying to figure out how I can do an if statement with this code. The if statement is supposed to determine whether or not the li gets a class name or not depending on if its read or not. What determines it is the data[x][messageRead] == 0 or not but not sure how to do this inside of this append.</p>

<pre><code>$.each(data, function(x)
{
    $('.mail').append('&lt;li&gt;&lt;a href=""&gt;&lt;strong&gt;Received: '+data[x]['dateSent']+'&lt;/strong&gt;&lt;small&gt;'+data[x]['subject']+'&lt;/small&gt;&lt;small&gt;From: '+data[x]['firstName']+' '+data[x]['lastName']+'&lt;/small&gt;&lt;/a&gt;&lt;/li&gt;'); 
});
</code></pre>
