Problem with custom Jquery function (show/hide)
<p>Here is my Javascript:</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
    function showhideitems(itemID){
      if ($(itemID).css('display') == 'none')
      {
        $(itemID).show('slow'); 
      } else { 
        $(itemID).hide('slow');
      } 
    }
});
&lt;/script&gt;
</code></pre>

<p>When I call the function using:</p>

<pre><code>`&lt;a href="#" onClick="showhideitems('#players1')"&gt;`
</code></pre>

<p>It doesn't work (the div doesn't show/hide). What is wrong with the above function?</p>
