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/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;
});
});
the only problem I'm having is - the text expands/disappears fine, but the image will only swap once
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/formHin
($(this).attr("src","/images/css/formHin
else
($(this).attr("src","/images/css/formHin
($(this).attr("src","/images/css/formHin
return false;
});
});
