I think $(this).attr('checked') is what you need.  The click function
already has selected the radio button so why reselect it? :checked
returns an array so at the minimum you need to specify which element
of that array to look at.

On Jan 16, 3:52 pm, "Rick Faircloth" <r...@whitestonemedia.com> wrote:
> I've tried every version of this I can think of (after
> checking the docs and Google, etc.), but I can't get this
> to work.
>
> Is there something wrong with this syntax?  If I check the
> radio input whose value="0", why won't this return 0 as the
> value?
>
> $('.delete-button').click(function(){
>
>      var button = $('input:radio[name=delete_button]:checked').val();
>
>           if (button == '0')
>
>                { alert(button); return; }
>
>           else
>
>                { ...
>
> Thanks,
>
> Rick

Reply via email to