Probably beginner jquery question... Here is my problem:
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.
My initial thinking was to call 2 custom jquery functions something like this (the number is dynamically inserted by PHP):
<div id="div152" >
<div id="content152">some content</div>
<a id="toggle-icon152" href="javascript:void(0);" onclick="togglemydiv(content152); changeicon(icon152)">
<div id="icon152">someicon</div>
</a>
</div>
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.