Hey guys,
I'm trying to toggle the contents of a span tag on and off using a jquery function.
I'm using a span tag as I want the contents to be inline with the rest of the data on the line when it gets toggled. On page load the image I want to toggle appears inline and in the correct position, however upon toggling the image re appears on the screen on a line below the rest of the contents of the line its supposed to be on.
Any suggestions?
Thanks in advance.
TheCodez:
JQuery:
$(document).ready(function() {
$('#btnHide').click(function() {
$('.iotoggle').toggle(0);
});
});
HTML(XML/XSL):
<xsl:choose>
<xsl:when test="io=1">
<span class="iotoggle">
<img src="../images/io/input.png" width="4" height="17" border="0" align="absmiddle" alt="Input"/>
</span>
</xsl:when>
<xsl:when test="io=2">
<span class="iotoggle">
<img src="../images/io/output.png" width="4" height="17" border="0" align="absmiddle" alt="Output"/>
</span>
</xsl:when>
</xsl:choose>