rizlaa
03-12-2006, 12:51 AM
Script: Switch Content Script (modified)
URL: http://www.dynamicdrive.com/forums/showthread.php?t=8186
Original Script: Switch Content Script
URL: http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
Hi,
I'm using a modified version of the Switch Content Script.
I've got this script working for me with one slight problem. I have the showstate span in a separate td to its corresponding heading, e.g.
I have:
<td onClick="expandcontent(this, 'sc1')" style="cursor:hand; cursor:pointer">Menu</td>
<td onClick="expandcontent(this, 'sc1')" style="cursor:hand; cursor:pointer"><span class="showstate"></span></td>
whereas in the original script it says to do this:
<h3 onClick="expandcontent(this, 'sc1')" style="cursor:hand; cursor:pointer"><span class="showstate"></span>What is JavaScript?</h3>
When I click on the second td it switches the image from + to -, but this doesn't happen when clicking on the first td.
Hope this was clear!
Regards,
Riz
URL: http://www.dynamicdrive.com/forums/showthread.php?t=8186
Original Script: Switch Content Script
URL: http://www.dynamicdrive.com/dynamicindex17/switchcontent.htm
Hi,
I'm using a modified version of the Switch Content Script.
I've got this script working for me with one slight problem. I have the showstate span in a separate td to its corresponding heading, e.g.
I have:
<td onClick="expandcontent(this, 'sc1')" style="cursor:hand; cursor:pointer">Menu</td>
<td onClick="expandcontent(this, 'sc1')" style="cursor:hand; cursor:pointer"><span class="showstate"></span></td>
whereas in the original script it says to do this:
<h3 onClick="expandcontent(this, 'sc1')" style="cursor:hand; cursor:pointer"><span class="showstate"></span>What is JavaScript?</h3>
When I click on the second td it switches the image from + to -, but this doesn't happen when clicking on the first td.
Hope this was clear!
Regards,
Riz