jQuery fade effect on replacing divs
<p>I've been struggling to find a solution for a <code>fade</code> effect with this script. I'm still learning basic jQuery, but cant seem to figure it out. The script is working fine, the divs are replacing, but with no animation. I have tried fadeToggle, fadeIn and fadeOut.</p>

<pre><code>function HideContent(d) {
    if(d.length &lt; 1) {
        return;
    }
    document.getElementById(d).style.display = "none";
}

function ShowContent(d) {
    if(d.length &lt; 1) {
        return;
    }
    document.getElementById(d).style.display = "block";
    $('#' + d).fadeToggle('slow');
}
</code></pre>

<p>I call the script with onmouseclick. I have about 14 different divs.</p>

<pre><code>&lt;a  onmouseclick="ShowContent('div1'); return true; "href="javascript:ShowContent('div1')"&gt; Link button &lt;/a&gt;
</code></pre>

<p>and to go back:</p>

<pre><code>&lt;a onmouseclick="HideContent('div1'); return true;" href="javascript:HideContent('div1')"&gt; BACK &lt;/a&gt;
</code></pre>

<p>How do I fix this problem?</p>
