Instantly share code, notes, and snippets.

Embed
What would you like to do?
override jquery UI widget method
// If you dont need to call original method
$.widget("ui.addresspicker", $.extend({}, $.ui.addresspicker.prototype, {
_updatePosition: function(){
// Do what you want to
}
}));
// If you need to call original method
var _updatePosition = $.ui.addresspicker.prototype._updatePosition;
$.widget("ui.addresspicker", $.extend({}, $.ui.addresspicker.prototype, {
_updatePosition: function(){
// Do what you want to
// Call original widget method
_updatePosition.apply(this, arguments);
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment