X-editable editable editing windows are not available



  • Copy the code http://jsfiddle.net/xBB5x/38/ All the libraries are doing well. Please indicate what my mistake is.

    <html>
    <head>
        <title>Test</title>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="lib/css/bootstrap-editable.css">
        <link rel="stylesheet" href="lib/css/bootstrap-combined.min.css">
        <script src="lib/js/static/jquery-1.11.3.min.js"></script>
        <script src="lib/js/static/bootstrap.min.js"></script>
        <script src="lib/js/static/jquery.mockjax.js"></script>
        <script src="lib/js/static/bootstrap-editable.js"></script>
        <script>
            $('#username').editable({
                type: 'text',
                url: '/post',
                pk: 1,
                title: 'Enter username',
                ajaxOptions: {
                    type: 'put'
                }
            });
    
        //ajax emulation
        $.mockjax({
            url: '/post',
            responseTime: 200,
            response: function (settings) {
                console.log(settings);
            }
        });
    &lt;/script&gt;
    

    </head>
    <body>
    <div style="margin: 150px">
    <a href="#" id="username">awesome</a>
    </div>
    </body>
    </html>

    P.S. How do you intercept the tie and take the count from the line?



  • <script>
        $(function(){
            $('#username').editable({
                type: 'text',
                url: '/post',
                pk: 1,
                title: 'Enter username',
                ajaxOptions: {
                    type: 'put'
                }
            });
    
            //ajax emulation
            $.mockjax({
                url: '/post',
                responseTime: 200,
                response: function (settings) {
                    console.log(settings);
                }
            });
        });
    </script>
    

    How do you intercept the tie and take the count from the line?

    $("body").on("click",".editable-submit", function(){
    
    var text = $(this).parents(".editableform").find(".editable-input").find("input").val();
    //alert(text);
    

    })




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2