模式关闭后无法在页面上滚动

时间:2019-06-19 11:43:22

标签: laravel modal-dialog popup

我有一个更新数据的模型。当单击更新按钮时,模态关闭,但我无法在模态关闭后无法在重新加载的页面上滚动

$(document).off('click','.updatecat');
 $(document).on('click','.updatecat',function(){
    $('#cat-update').ajaxSubmit({ 
        dataType:'json',
        success:function(response){
            if(response.type == 'success'){
                $('#catupdate').modal('hide');
                $('.modal-backdrop').remove()
                $('#taba4').trigger('click');  
            }else{
                alert(response.message);
            }
            alert("Category Updated");
            console.log(response);

        }
    })

 });

我不知道为什么会这样。我在其他地方实现了相同的脚本,模态关闭后我可以在页面上滚动。请帮忙。

1 个答案:

答案 0 :(得分:1)

移至线下

$('#catupdate').modal('hide');
$('.modal-backdrop').remove()

并在行下方添加

if(response.type == 'success'){
   $('#catupdate').hide();
}
相关问题