How to create an array in jQuery for holding values of each post?
<p>What I want to do is set an icon for each category using jQuery. So far the code looks like this:</p>

<pre><code>var category = $(".odd, .even").children('.views-field-field-category').text();

if (category=="funny") { 
   $(".odd, .even").children('.views-field-field-category').html('image-tag'); 
}
</code></pre>

<p>Since the variable category gathers all of the category values in that page and combines them (so that it looks like "funny gifs videos gifs" etc) I've decided that I need an array to hold them each seperately. Now I've tried to do it in various ways, but without any success. Can you please help and show me how to set it up so that I could use <code>if (category[i]=="funny") { do this }</code>?</p>
