Jquery Issue
I'm writing code so that you click on an image, and it shows a hidden div and swaps the image.
Currently, it animates the hidden div, and swaps the image to the new image, but I can't get it to swap back!
Any pointers?
$(document).ready(function() {
$('div.formHelp > div').hide();
$('div.formHelp > img').click(function() {
$(this).next('div').toggle('normal');
if
($(this).attr("src","/images/css/formHin tButton.gif"))
($(this).attr("src","/images/css/formHin tButtonSelected.gif"))
else
($(this).attr("src","/images/css/formHin tButtonSelected.gif"))
($(this).attr("src","/images/css/formHin tButton.gif"))
return false;
});
});
Currently, it animates the hidden div, and swaps the image to the new image, but I can't get it to swap back!
Any pointers?
$(document).ready(function() {
$('div.formHelp > div').hide();
$('div.formHelp > img').click(function() {
$(this).next('div').toggle('normal');
if
($(this).attr("src","/images/css/formHin
($(this).attr("src","/images/css/formHin
else
($(this).attr("src","/images/css/formHin
($(this).attr("src","/images/css/formHin
return false;
});
});
