[jQuery] Re: modifying a label when radio input selected

2007-11-14 Thread sperks
While you didn't give me the answer I was looking for, you inspired me to mover forward in the right direction. I finally got the result I was after. Here's the script I ended with (anyone wants to tighten this please I'd be more than welcome!) $(document).ready(function() { var $inputId

[jQuery] Re: modifying a label when radio input selected

2007-11-14 Thread whutevr
You could do something like this: $('div#searchLabels label#labelRecipesCat').click(function() { if (this.checked ){ $(''div#searchLabels label#labelRecipesCat'').addClass('selected'); $(''div#searchLabels label#labelEntireSite').removeClass('selected'); }; }); On Nov 13, 10:01

[jQuery] Re: modifying a label when radio input selected

2007-11-13 Thread sperks
Just to show that I'm doing some work on my own and not just fishing for solutions. I have the functionality working, but I'm wanting to target the label element based on whether the related input element is selected or not, rather than on click. The reason for this is that the radio input is de

[jQuery] Re: modifying a label when radio input selected

2007-11-13 Thread sperks
Apologies, if this comes through to the list twice (I waited a few hours before pushing again). Update. Here's the beautiful hunk of script that I have at the moment, but I'm wanting to add the class to the label based on whether it's associated input element is selected. $(document).ready(funct