Jquery: how can i "fire" an event?
<p>i have a <code>&lt;div&gt;</code> that contains several elements; i've added a link with which the user can open and close the div container and it runs fine.
I would like to close that container also when the user clicks another item, so i would like to trigger the open/close i've defined simulating the click in the open/close link but it does not run.</p>

<pre><code>html code:
&lt;div id=container_expand_collapse&gt;Open-close&lt;/div&gt;
&lt;div id=project_div_container&gt;

    &lt;div class=element&gt;Element1&lt;/div&gt;
   ....
&lt;/div&gt;

JQuery code:

$('#container_expand_collapse').toggle(function() {
      $('#project_div_container').animate({width: 10});
   }, function() {
      $('#project_div_container').animate({width: 120});
   }
);

$(".element").click(function() {
   $("#container_expand_collapse").trigger("toggle");
}
</code></pre>

<p>How can i force the toggle event?
Thanks!</p>
