jquery-widgets

How to change this jQuery widget (written for jQueryUI 1.7) so that it works with jQueryUI 1.8

对着背影说爱祢 提交于 2019-11-28 02:20:56
问题 This jQuery plugin, which lets users draw rectangles in a div, works with jQueryUI 1.7.2. I need to get it working with jQueryUI 1.8.4. From reading the widget upgrade guide, I can't work out what needs to change. I tried renaming _init() to _create(), but that didn't do anything. What else do I need to change to get it working? Thanks for reading. 回答1: The $.widget signature changed to do the extend internally, so change this: $.widget("ui.boxer", $.extend({}, $.ui.mouse, { To this: $.widget