tags:

views:

1906

answers:

3

I wrote below code to remove checked item from radio group in my form by double click.

$("input[type='radio']").each(function(){
            $(this).dblclick(function(){
                $(this).removeAttr("checked");
            });
        });

but this code doesn't work in FireFox but work in IE. anybody know what's the problem?

tanx

+1  A: 

I am so sorry, It works. I think cache makes this issue.

Ata
Hi,Can you please explain "catch" ?
Keith Donegan
sorry, cache no catch
Ata
A: 

It's not running on ie

+1  A: 

Either way, you probably want to wire it up a little differently.

$("input[type='radio']").dblclick(function(){
  $(this).removeAttr("checked");
});

One thing that can help when learning jQuery is to think set-based, like SQL. Selectors can select one or a group of elements. Any function or event you call on the group applies to the whole group.

Andy Gaskell
Wow. Did not notice the date. Oh well, I probably won't help Ata - but maybe I can help someone else.
Andy Gaskell