jQuery Integration
jQuery Support
Native jQuery support was discontinued in Jspreadsheet v10. However, you can still integrate jQuery with Jspreadsheet by using the following polyfill to maintain compatibility.
jQuery Polyfill
Add this polyfill to your code to enable jQuery integration with Jspreadsheet:
// jQuery Support Polyfill
if (typeof(jQuery) !== 'undefined') {
(function($){
$.fn.jspreadsheet = $.fn.jexcel = function(mixed) {
let container = $(this).get(0);
if (! container.jspreadsheet) {
return jspreadsheet($(this).get(0), arguments[0]);
} else {
if (typeof(arguments[0]) == 'number') {
let n = arguments[0];
let i = 2;
} else {
let n = 0;
let i = 1;
}
return container.jspreadsheet[n][mixed].apply(
container.jspreadsheet[n],
Array.prototype.slice.call(arguments, i)
);
}
};
})(jQuery);
}