1
/* Apply the jEditable handlers to the table */

    var oTable = $("#scheduleRequestListTable").dataTable();
    $("td(:first-child, :empty)", oTable.fnGetNodes()).editable( 'editable_ajax.php', {
                "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]
                    };
                },
                type : 'text',              
                onblur: 'submit',
                "height": "100%",
                "width": "100%"
    } );

上記のコードで次のエラーが発生します。

Uncaught Error: Syntax error, unrecognized expression: (:first-child, :empty) .

セルが空(nullまたは空白)の場合、テーブルの最初の列を編集可能にしたい。

さまざまなオプションを試してみましたが、成功しませんでした。

$("td:eq(0):empty").
$("td:empty:eq(0)")
4

1 に答える 1