Image

Jquery Assistance...

I'm trying to write a lil' script to expand a hidden div and swap the image (think click on '?' and '?' becomes a pressed state).

the only problem I'm having is - the text expands/disappears fine, but the image will only swap once (and also it swaps all the images, not just the one clicked!)FIXED this part

Anyone have any pointers?


I've updated the code


$(document).ready(function() {
$('div.formHelp > div').hide();
$('div.formHelp > img').click(function() {
$(this).next('div').toggle('normal');
if
($(this).attr("src","/images/css/formHintButton.gif"))
($(this).attr("src","/images/css/formHintButtonSelected.gif"))
else
($(this).attr("src","/images/css/formHintButtonSelected.gif"))
($(this).attr("src","/images/css/formHintButton.gif"))
return false;
});
});