单选按钮更改fadeOut和fadeIn不起作用 [英] radio button change fadeOut and fadeIn didn't work

查看:79
本文介绍了单选按钮更改fadeOut和fadeIn不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

$(document).ready(function () {

    $("input[name='Round_trip']").on('click', function () {
        console.log("changed");
        if ($("input[name='Round_trip']:checked").val() === 'false')
            $("#returnFlightInfo").fadeOut();//this didn't work
        else
            $("#returnFlightInfo").fadeIn();//this didn't work

        console.log($("input[name='Round_trip']:checked").val());
//the console.log indeed show change and the value is correct
    });

})

推荐答案

(文件).ready(function(){
(document).ready(function () {


input [name ='Round_trip'])。on(' click',function(){
console.log( 已更改);
如果
("input[name='Round_trip']").on('click', function () { console.log("changed"); if (


input [name ='Round_trip']:选中)。val ()=== ' false'
("input[name='Round_trip']:checked").val() === 'false')


这篇关于单选按钮更改fadeOut和fadeIn不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆