Oh brother...the radio input name is "delete_confirm", not 
"delete_button"...good
grief.  Too much looking at code today...

Thanks for the feedback!

Rick

> -----Original Message-----
> From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On 
> Behalf Of donb
> Sent: Friday, January 16, 2009 5:36 PM
> To: jQuery (English)
> Subject: [jQuery] Re: Is something wrong with this syntax?
> 
> 
> 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