Having an issue with my "hideText" image replacing my "showText" Anyone know why? This works fine if show and hide are both text, but not at all when show and hide are images.
$payload .= '<script type="text/javascript"><!--
$(document).ready(function() {
var showText="<img src=\'images/panelOpen.gif\' />";
var hideText="<img src=\'images/panelup.gif\' />";
$(".toggle").prev().append(\'<a href="#" class="toggleLink">\'+showText+\'</a> \');
$(\'.toggle\').hide(); $(\'a.toggleLink\').click(function() {
if ($(this).html()==showText) { $(this).html(hideText); }
else { $(this).html(showText); }
$(this).parent().next(\'.toggle\').toggle(\'slow\');
return false; }); });
//-->
</script>';