JQuery double click function not working on radio input in FireFox

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 does work in IE. does anyone know what the problem is?

Tanx

0


source to share


2 answers


Anyway, 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 in terms of a set like SQL. Selectors can select one or a group of elements. Any function or event triggered by a group applies to the entire group.

+2


source


I'm sorry this works. I think the cache is doing this problem.



+1


source







All Articles