I am trying to use a jQuery extension I came across (handsontable). I am having no problem creating the table
var spreadsheet = $("#dataTable").handsontable({
rows: 3,
cols: 15,
minSpareRows: 2
});
However after I create the table I want to call various helper functions I see declared in the javascript for the Handsontable object. The problem is the extension seems to return this.each(function() { ... }); and I don’t understand how I can access the underlaying Handsontable object from this. The js for the extension can be found here and I put a small demo together on the following link
as you can see I would like get the data of one of the cells when I click a button.
The relevant code is in the end:
That means, the code sets the
Handsontableinstances as a data attribute to the elements (and returns the selected set to be chainable). Having one element, you can easily extract it withinstance = $el.data("handsontable"). If you have a set of elements, you will need to loop over it – e.g. witheach().