Pregunta

I am working to try to implement the jquery datatables jeditable plugin at http://www.appelsiini.net/projects/jeditable. I have:

<script language="javascript" type="text/javascript">
          $(document).ready(function() {
    /* Init DataTables */
    var oTable = $('#myDataTable').dataTable();

    /* Apply the jEditable handlers to the table */
    $('td', oTable.fnGetNodes()).editable( 'js/datatables/examples/examples_support/editable_ajax.php', {  # line 25
        "callback": function( sValue, y ) {
            var aPos = oTable.fnGetPosition( this );
            oTable.fnUpdate( sValue, aPos[0], aPos[1] );
        },
        "submitdata": function ( value, settings ) {
            return {
                "row_id": this.parentNode.getAttribute('id'),
                "column": oTable.fnGetPosition( this )[2]
            };
        },
        "height": "14px"
    } );
} );
        </script>

In chrome dev tools I see:

Uncaught TypeError: Object [object Object] has no method 'editable'

on line 25. How can I fix this?

¿Fue útil?

Solución

I think the problem is you have not included the library file in your page.

Included the jquery.jeditable.js file in your page and check

https://github.com/tuupola/jquery_jeditable

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top