如何从if语句使用jQuery进行流控制?

时间:2013-11-13 00:26:38

标签: jquery flow-control

示例:

if(login()) {

// jQuery to change CSS attribute from hidden to visible

}

我想在登录时向用户显示输入表单,否则他们看不到表单。

谢谢,

1 个答案:

答案 0 :(得分:0)

查看jQuery hide()

if(login()) {

        $('#inputthing').show();

    } else {

        $('#inputthing').hide();
    }