Javascript jQuery UI-未捕获类型错误:对象[Object]没有方法';标签';(玉制)

Javascript jQuery UI-未捕获类型错误:对象[Object]没有方法';标签';(玉制),javascript,jquery,jquery-ui,pug,Javascript,Jquery,Jquery Ui,Pug,似乎无法获取此已翻译的HTML 无论如何,我检查了所有现有答案,并确保: 语法正确 jQuery加载在jqueryui加载在脚本加载之前(我甚至把它放在页面的另一端…) 确保jade正确编译为html 所以,是的,仍然没有工作。有人有什么想法吗 代码: 第1部分: link(rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css") script(src="//code.jquery.c

似乎无法获取此已翻译的HTML

无论如何,我检查了所有现有答案,并确保:

  • 语法正确
  • jQuery加载在jqueryui加载在脚本加载之前(我甚至把它放在页面的另一端…)
  • 确保jade正确编译为html
  • 所以,是的,仍然没有工作。有人有什么想法吗

    代码:

    第1部分:

    link(rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css")
    script(src="//code.jquery.com/jquery-1.9.1.js")
    script(src="//code.jquery.com/ui/1.10.4/jquery-ui.js")
    
    第2部分:

    #tabs
      ul
        li 
         a(href='#tabs-1') Tab 1
        li 
         a(href='#tabs-2') Tab 2
        li 
         a(href='#tabs-3') Tab 2
        #tabs-1
        #tabs-2
        #tabs-2
    
    第3部分:

    script.
      $(function() {
         $( "#tabs" ).tabs();
    });
    
    整件事:

    doctype html
    
    html(lang='en')
    head
        meta(charset='utf-8')
        meta(http-equiv='X-UA-Compatible', content='IE=edge')
        meta(name='viewport', content='width=device-width, initial-scale=1')
        meta(name='description', content='')
        meta(name='author', content='')
        link(rel='shortcut icon', href='')
        title Starter Template for Bootstrap
    
        link(href='/css/bootstrap.min.css', rel='stylesheet')
        link(href='/css/mystyles.css', rel='stylesheet')
        link(rel='stylesheet', href='codemirror/lib/codemirror.css')
        link(rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css")
        script(src="//code.jquery.com/jquery-1.9.1.js")
        script(src="//code.jquery.com/ui/1.10.4/jquery-ui.js")
    
    
      body
       form(name='uploadDL', id='uploadDL', action = '/sendDL', method = 'post')
        .navbar.navbar-inverse.navbar-fixed-top(role='navigation')
          .container-fluid
            .navbar-header
              button.navbar-toggle(type='button', data-toggle='collapse', data-target='.navbar-collapse')
                span.sr-only Toggle navigation
                span.icon-bar
                span.icon-bar
                span.icon-bar
              a.navbar-brand(href='#') DL in JS
            .collapse.navbar-collapse
              ul.nav.navbar-nav
                  button.btn.btn-default.navbar-btn(type="submit") Run
            //
              /.nav-collapse 
        br
        .container-fluid
          .col-md-3
              textarea(name = "DLCode", id="DLcode") x=1;y=x+1;z=x+y;t=z+x;a=x+x+x;
          .col-md-9
            .canvas
              #tabs
                ul
                  li 
                    a(href='#tabs-1') Tab 1
                  li 
                    a(href='#tabs-2') Tab 2
                  li 
                    a(href='#tabs-3') Tab 2
                #tabs-1
                #tabs-2
                #tabs-2
    
    
    
           Placed at the end of the document so the pages load faster 
        script(src='codemirror/lib/codemirror.js')
        script(src='codemirror/mode/javascript/javascript.js')
        script.
          var editor = CodeMirror.fromTextArea(document.getElementById("DLcode"), {lineNumbers: true,mode: "javascript"});
    
        script(src='/js/bootstrap.min.js')
        script(src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js")
        script(src="http://mbostock.github.com/d3/d3.js")   
        script(src='/d3graph.js')
        script.
           $(uploadDL).on('submit', 'form', function(e) {
           var form = e.currentTarget;
           $.ajax({
           url: form.action,         
           type: 'POST',                                             
           data: $(form).serialize(), 
           success: function(response) {renderGraph(response);},
           error: function() {}
           });  
           e.preventDefault();
           });
        script.
          $(function() {
               $( "#tabs" ).tabs();
          });
    

    jquery有冲突试试这个

    jQuery(function() {
         jQuery( "#tabs" ).tabs();
    });
    
    另外,您已经包含jquery两次,请删除第二次

    script(src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js")
    

    在浏览器控制台中,您测试
    $==jQuery
    @ArunPJohny是否正确,我尝试使用
    jQuery
    而不是
    $
    。另外一个脚本也很有效。我想,当我在不同的url上查看它时,我觉得这是第二件事:|它如此愚蠢几乎和它不起作用一样令人沮丧。谢谢