Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xcode/8.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
Twitter bootstrap 3 X-可编辑helloworld_Twitter Bootstrap 3_X Editable - Fatal编程技术网

Twitter bootstrap 3 X-可编辑helloworld

Twitter bootstrap 3 X-可编辑helloworld,twitter-bootstrap-3,x-editable,Twitter Bootstrap 3,X Editable,我正在尝试编写一个HelloWorld Bootstrap3和X-editable的示例。我在这篇文章中附上我的页面源代码。我面临两个问题 当我单击可编辑链接时,使用“弹出”模式时,我收到以下错误。 TypeError:this.getCalculatedOffset不是函数 如果我从弹出式切换到内联式,至少页面会显示,但是按钮不会正确显示 如有任何反馈,将不胜感激。页面来源如下:- <!DOCTYPE html> <html> <head>

我正在尝试编写一个HelloWorld Bootstrap3和X-editable的示例。我在这篇文章中附上我的页面源代码。我面临两个问题

  • 当我单击可编辑链接时,使用“弹出”模式时,我收到以下错误。 TypeError:this.getCalculatedOffset不是函数

  • 如果我从弹出式切换到内联式,至少页面会显示,但是按钮不会正确显示

  • 如有任何反馈,将不胜感激。页面来源如下:-

    <!DOCTYPE html>
    <html>
       <head>
          <meta charset="utf-8">
          <title>X-Editable Bootstrap Hello World!</title>
          <link rel="stylesheet" href="twitter-bootstrap/css/bootstrap.css" type="text/css"/>
          <link href="bootstrap-editable/bootstrap3-editable/css/bootstrap-editable.css" rel="stylesheet">
       </head>
       <body>
          <div class="container">
             <h1><a href="#">Hello World Bootstrap</a></h1>         
             <div class="hero-unit">
                <p>Hey.. this is my very first XEdit-able Bootstrap site.</p>
                <!-- <a href="#" id="username" data-type="text" data-placement="right" data-title="Enter username">superuser</a> -->
                <a href="#" id="username">superuser</a>
             </div>
          </div>
    
          <script src="http://code.jquery.com/jquery-2.0.3.js"></script>
          <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
          <script src="twitter-bootstrap/js/bootstrap.js"></script>  
          <script src="bootstrap-editable/bootstrap3-editable/js/bootstrap-editable.js"></script>     
    
            <script type="text/javascript">
    
                $.fn.editable.defaults.mode = 'inline';
    
                $(document).ready( function(){
    
                    //$('#username').editable();
    
                    $('#username').editable( {
                        type: 'text',
                        pk: 1,
                        url: '/post',
                        title: 'Enter username'
                    });
    
                } );
    
            </script>
       </body>
    </html>
    
    
    X-可编辑引导你好世界!
    嘿。。这是我的第一个可执行引导站点

    $.fn.editable.defaults.mode='inline'; $(文档).ready(函数(){ //$('#用户名')。可编辑(); $('#用户名')。可编辑({ 键入:“文本”, 主键:1,, url:“/post”, 标题:“输入用户名” }); } );
    您的引导css和js文件必须来自2.xx版本的引导,这是一个问题。
    将x-editable用于引导程序2或将引导程序更新为3+。

    从引导程序2升级到引导程序3后,我遇到了相同的问题。 我已经升级了Bootstrap的CSS、X-Editable的CSS和JS,但是忘记升级Bootstrap的JS了,它仍然适用于v2

    不要忘记更新所有文件:

    • Bootstrap 3
      .css
      .js
    • 引导程序3
      .css
      .js
      X-可编辑
    可能有点晚了,但希望这仍然可以帮助一些人