Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/255.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 wordpress JS插件的静态html问题_Javascript_Php_Jquery_Html_Wordpress - Fatal编程技术网

Javascript wordpress JS插件的静态html问题

Javascript wordpress JS插件的静态html问题,javascript,php,jquery,html,wordpress,Javascript,Php,Jquery,Html,Wordpress,我正在将静态html转换为wordpress主题。一切都很好,除了一件小事 我的静态html在头部使用此脚本 <script> // terrificjs bootstrap (function($) { $(document).ready(function() { var $page = $('body'); var config = { dependencyPath: {

我正在将静态html转换为wordpress主题。一切都很好,除了一件小事

我的静态html在头部使用此脚本

<script>
  // terrificjs bootstrap
  (function($) {
      $(document).ready(function() {
          var $page = $('body');
          var config = {
            dependencyPath: {
              plugin: 'javascripts/'
            }
          }
          var application = new Tc.Application($page, config);
          application.registerModules();
          application.start();
      });
  })(Tc.$);
</script>
我在plugin:行中尝试了类似的url

plugin: '<?php echo get_template_directory_uri() ?>/javascripts/'
插件:'/javascripts/'
但错误不断发生 有人知道这个脚本的用途以及如何在我的wordpress主题中实现它吗? 提前感谢:)

我发现了问题!
函数完成后,将加载可怕的JS库。

看起来是这样的:是的,我找到了。无论如何,谢谢:)我仍然不知道它为什么会给我这个错误:/如果“Tc未定义”,您的项目中没有包含可怕的js库。它包含在另一个.js文件中,并且该文件正在正确加载
plugin: '<?php echo get_template_directory_uri() ?>/javascripts/'