0
Avoir un problème avec mon image "hideText" remplaçant mon "showText" Quelqu'un sait pourquoi? Cela fonctionne bien si afficher et masquer sont à la fois du texte, mais pas du tout quand afficher et masquer sont des images.JQUERY: Image remplaçant des problèmes
$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>';