javascript - jQuery Code not working in chrome and safari -
i have following code shows couple radio buttons on click. works fine in ie , firefox not work in chrome or safari though alert works.
function toggle_question_types(){ if(jquery('input[name="question"]:checked').val()==1){ jquery("#abc").show(); alert('this works'); } } toggle_question_types(); jquery('input[name="question"]').change(function(){ toggle_question_types(); }); forgot put } before toggle_question_types(); not working still.
you never closed function definition (insert } before explicit call toggle_question_types), i'm not entirely sure how works in browsers without infinitely recursing.
Comments
Post a Comment