Browse Source

change data('value') to attr('data-value')

> To retrieve the value's attribute as a string without any attempt to convert it, use the attr() method.
http://api.jquery.com/data/#data-key

And works
David 11 years ago
parent
commit
8f9c9a14bd
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

@@ -355,7 +355,7 @@
                 // save td's id and class
                 row['_' + field + '_id'] = $(this).attr('id');
                 row['_' + field + '_class'] = $(this).attr('class');
-                row['_' + field + '_data_value'] = $(this).data('value');
+                row['_' + field + '_data_value'] = $(this).attr('data-value');
             });
             data.push(row);
         });