Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/375.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
Javascript push.js Uncaught TypeError:无法读取属性';removeChild';空的_Javascript_Jquery_Ratchet 2_Push.js - Fatal编程技术网

Javascript push.js Uncaught TypeError:无法读取属性';removeChild';空的

Javascript push.js Uncaught TypeError:无法读取属性';removeChild';空的,javascript,jquery,ratchet-2,push.js,Javascript,Jquery,Ratchet 2,Push.js,当我点击页面上的链接时,URL会更新,我会看到正确的页面内容瞬间闪烁,然后上一页的内容会保持不变。只有在使用“数据转换”属性时,才会出现这种情况。在Chrome仿真模式或使用Xcode emulator时都会出现相同的问题 在Chrome的控制台中,我在push.js的第373行得到了这个未捕获的类型错误 为了解决问题,我将两个页面精简为基本内容,并将其中一个粘贴到下面。(第二个页面是相同的,仅链接到一个带有不同文本的.html) 知道为什么上一页的内容会重新加载吗?(正如我所说,URL会更新—

当我点击页面上的链接时,URL会更新,我会看到正确的页面内容瞬间闪烁,然后上一页的内容会保持不变。只有在使用“数据转换”属性时,才会出现这种情况。在Chrome仿真模式或使用Xcode emulator时都会出现相同的问题

在Chrome的控制台中,我在push.js的第373行得到了这个未捕获的类型错误

为了解决问题,我将两个页面精简为基本内容,并将其中一个粘贴到下面。(第二个页面是相同的,仅链接到一个带有不同文本的.html)

知道为什么上一页的内容会重新加载吗?(正如我所说,URL会更新——刷新会显示正确的内容)


测试一
一

我认为push.js不是一个实际的文件,它只是一个概念。不要像你在脑子里做的那样,把它当作参考资料。这就成功了。这只是一个非常基本的误解。@ferr,push.js不仅仅是一个概念。它与toggle和其他文件一起在中是一个单独的文件。它们在ratchet.js版本中聚合,但是如果您正在为某些自定义功能积极修改ratchet源代码,您将为调试版本导入push.js和其他版本。@kindasimple啊,感谢您的澄清!
    <!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>test one</title>

    <!-- Sets initial viewport load and disables zooming  -->
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">

    <!-- Makes your prototype chrome-less once bookmarked to your phone's home screen -->
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="mobile-web-app-capable" content="yes">

    <!-- Include the compiled Ratchet CSS -->
    <link href="css/ratchet.css" rel="stylesheet">

    <!-- Include the compiled Ratchet JS -->
    <script src="js/ratchet.js"></script>
    <script src="js/push.js"></script>
  </head>
  <body>

  <header class="bar bar-nav">
    <h1 class="title">one</h1>
  </header>

  <div class="content">
<a href="two.html" data-transition="slide-in">go to two</a>
  </div>
  </body>
</html>