Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/83.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ui jquery滚动防止_Jquery_Html - Fatal编程技术网

Ui jquery滚动防止

Ui jquery滚动防止,jquery,html,Jquery,Html,我使用这段代码在绘图画布的顶部创建一条消息,效果很好,但有时用户会滚动屏幕并使绘图页变形 <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>jQuery UI Dialog - Modal

我使用这段代码在绘图画布的顶部创建一条消息,效果很好,但有时用户会滚动屏幕并使绘图页变形

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>jQuery UI Dialog - Modal message</title>
  <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  <link rel="stylesheet" href="http://sktcho.com/wp-includes/qp2qp-sktcho/style.css">
  <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  <script>
  $( function() {
    $( "#dialog-message" ).dialog({
      modal: true,



      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });
  } );
  </script>
</head>
<body>

<div id="dialog-message" title="Quick tutorial">
<div id="dialog" title="Basic dialog">


<p> <center><font size="4" color="black">use two fingers to draw and one finger to move the screen</font></center></p>
<p> <center><font size="4" +/- to zoom in & out</font></center></p>
  <p><img border="0" src="http://sktcho.com/wp-includes/qp2qp-sktcho/giphy.gif"></p>
</div>


</body>
</html>   

jQuery UI对话框-模式消息
$(函数(){
$(“#对话框消息”).dialog({
莫代尔:是的,
按钮:{
好的:函数(){
$(此).dialog(“关闭”);
}
}
});
} );
用两个手指画画,用一个手指移动屏幕


如果要在用户打开对话框时阻止其滚动,可以按如下所示更改对话框代码

$( function() {
    $( "#dialog-message" ).dialog({
      modal: true,
      "allowScrolling": false,
      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });
} );

如果需要其他选项,请选中。

如果要在用户打开对话框时阻止用户滚动,可以按如下所示更改对话框代码

$( function() {
    $( "#dialog-message" ).dialog({
      modal: true,
      "allowScrolling": false,
      buttons: {
        Ok: function() {
          $( this ).dialog( "close" );
        }
      }
    });
} );

如果需要其他选项,请选中。

我缺少一些代码,即实际的绘图画布和将类设置为.modal open的部分(CSS中有)。请更新您的问题。(此处临时提琴:)感谢您的帮助..画布的html文件是我缺少了一些代码,即实际的绘图画布和将类设置为.modal open的部分(CSS中有)。请更新您的问题。(临时小提琴:)谢谢你的帮助。画布的html文件是