小编qud*_*rat的帖子

为什么这个if/else语句总是执行if分支?

嘿家伙我知道存在,.slideToggle()但我想稍后添加更多功能.

我不知道我做错了什么,滑动工作,但我不能滑下来.

我可以不覆盖我的var吗?当有人可以帮助我时会很好.

$(document).ready(function () {

    var resizeValue = true;
    $(".resizeSelect").click(function () {
        if (resizeValue === true) {
            $(".resize").slideUp(

            function () {
                $('.parent').height($('.child').height('100'));
            });
            var resizeValue = false;
        } else {
            $(".resize").slideDown(

            function () {
                $('.parent').height($('.child').height('100'));
            });
            var resizeValue = true
        };
    });
});
Run Code Online (Sandbox Code Playgroud)

javascript jquery

0
推荐指数
2
解决办法
679
查看次数

标签 统计

javascript ×1

jquery ×1