gridster.js
gridster.js copied to clipboard
jQuery.fn.bind() is deprecated
Hello,
In src/jquery.gridster.js, you have a $window.bind(). But with jQuery 3.x, window.bind() is deprecated, and must be replaced by .on():
As of jQuery 3.0, .bind() has been deprecated. It was superseded by the .on() method for attaching event handlers to a document since jQuery 1.7, so its use was already discouraged.
I discovered it using the jQuery Migrate plugin.
But as I don't know what code you should write, I don't do a PR :) Perhaps:
$window.on('resize.gridster', throttle(
$.proxy(this.recalculate_faux_grid, this), 200));
};