From 6988c91390eaf419624900025356dc6ab511b662 Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Mon, 21 Jan 2013 16:36:29 +0100 Subject: [PATCH] use index() to get cellIndex and rowIndex --- public/edit_table.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 ); -- 2.20.1