From: Dobrica Pavlinusic Date: Mon, 21 Jan 2013 15:36:29 +0000 (+0100) Subject: use index() to get cellIndex and rowIndex X-Git-Url: http://git.rot13.org/?p=MojoFacets.git;a=commitdiff_plain;h=6988c91390eaf419624900025356dc6ab511b662 use index() to get cellIndex and rowIndex --- diff --git a/public/edit_table.js b/public/edit_table.js index d3422eb..9914a3c 100644 --- a/public/edit_table.js +++ b/public/edit_table.js @@ -13,8 +13,13 @@ var cell_blur = function() { */ var _row_id = $(this).parent().parent().attr('title'); - var x = $(this).parent().attr('cellIndex'); - var y = $(this).parent().parent().attr('rowIndex'); + var x = $(this).parent().index(); + var y = $(this).parent().parent().index(); + + if ( ! x || ! y ) { + console.error('no x ', x, ' or y ', y, ' defined'); + return; + } var new_content = $(this).val(); // $(this).replaceWith( new_content );