Dug, When you put alert($(this).parents(".def_set").css("backgroundColor")); inside the click, what response do you get?
On 8/7/07, dug <[EMAIL PROTECTED]> wrote: > > > Dear all, > > I've been faffing with this thing all morning. The more I faff, the > closer I get to using getElementById. The following should toggle the > background colour of a submit button's parent (a containing 'span' tag > pair set to display:block) > > I am obviously missing something very simple. > > $(".doSetSelect").click(function(event) { > > if ($(this).parents(".def_set").css("backgroundColor") == > "rgb(238,238,238)") > { $(this).parents(".def_set").css({backgroundColor: > "rgb(255,255,255)"}) } > else > { $(this).parents(".def_set").css({backgroundColor: > "rgb(238,238,238)"}) } > > return false; > }); > > In expectation of kicking myself ;-) > > All the best, > Dug > > -- Benjamin Sterling http://www.KenzoMedia.com http://www.KenzoHosting.com