calling jquery function onclick event
<p>Probably beginner jquery question... Here is my problem:</p>

<p>I have dynamically created list of div elements. Each has its' specific content, id and a toggle icon in the corner. When I press toggle icon it causes the following: expands/hides the content of the div and changes the icon.</p>

<p>My initial thinking was to call 2 custom jquery functions something like this (the number is dynamically inserted by PHP):</p>

<pre><code>&lt;div id="div152" &gt;
  &lt;div id="content152"&gt;some content&lt;/div&gt;
  &lt;a id="toggle-icon152" href="javascript:void(0);" onclick="togglemydiv(content152); changeicon(icon152)"&gt;
    &lt;div id="icon152"&gt;someicon&lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>Now this works in some browsers but obviously it is not how it should be done as it doesn't work in FF in windows or in fiddle. Any help would be appreciated.</p>
