JavaScript problem with ID name
<p>I'm using the below code to hide and show divs</p>

<pre><code>function showSubCat(id)
{   for(var i=1; i&lt;=12; i++)
    {   var hideid = 'cat'+i;
        document.getElementById(hideid).style.display = "none";
    }
    document.getElementById(id).style.display = "block";
}
</code></pre>

<p>The IDs of the div are from cat1 to cat12.
All works good, except for cat11 and cat12, they just dont show.</p>

<p>Any ideas?</p>

<p>SOLVED: Function works, the problem was in the  ending tag.</p>

<p>Thaks.</p>
