jQuery or Javascript - how to disable window scroll without overflow:hidden;

后端 未结 8 1890
耶瑟儿~
耶瑟儿~ 2020-12-01 01:16

Hi is it possible to disable window scrolling without using overflow:hidden; when i\'m hover an element?

i tryed :

$(\'.chat-content\').         


        
8条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-01 01:51

    tfe answered this question in another post on StackOverflow: Answered

    Another method would be to use:

    $(document).bind("touchmove",function(event){
      event.preventDefault();
    });
    

    But it may prevent some of the jquery mobile functionality from working properly.

提交回复
热议问题