whats wrong with this jquery script?
<p>so im trying to apply a basic on click show hide element but for some reason it doesnt take no effect</p>

<p>im using it via an external javascript file and including the latest jquery library both included in my master page firebug shows the code so i know its picking it up </p>

<p>heres the code ive tried </p>

<pre><code>$(document).ready(function () {
// hides the divx as soon as the DOM is ready
$('#ecom').hide();
// shows the div on clicking the noted link  
$('.eco').click(function () {
    $('#ecom').show('slow');
    return false;
});
// hides the div on clicking the noted link  
$('.eco').click(function () {
    $('#ecom').hide('fast');
    return false;
}); 
});
</code></pre>

<p>html</p>

<pre><code>&lt;h2 class="eco"&gt;Ecommerce Web Design&lt;/h2&gt;
&lt;div id="ecom"&gt;content&lt;/div&gt;
</code></pre>

<p>I dont see the problem myself</p>

<p><strong>This was the solution i used in the end does what i want it to do :)</strong>
Thankyou all for the answers too </p>

<pre><code>$(document).ready(function () {
$('#ecom').hide();
$('.eco').click(function () {
    $('#ecom').toggle('slow');
    return false;
});
</code></pre>
