Switch (with click event) not passing parameter in firefox

I have radio buttons built into my form as

<%= f.radio_button :name_present,true,:class => "namePresent"%>
<%= f.radio_button :name_present,false,:class => "namePresent"%>

and the application.js file contains

$(".namePresent").live('click',function(e){

     $("#form").submit();
//form is the id of my form_for
 });

All parameters are passed to chrome, but are not transferred from the radio buttons in the firefox parameter.

+3
source share
1 answer

I must indicate that live and bind are both out of date. You can perform both operations: on ()

Try:

$(".namePresent").on('click',function(e){

   $("#form").submit();
//form is the id of my form_for
 });

Look at the link.

+2
source

All Articles