Created
July 16, 2011 10:14
-
-
Save sgruhier/1086231 to your computer and use it in GitHub Desktop.
override jquery UI widget method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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