Skip to content

Instantly share code, notes, and snippets.

@nnarhinen
Created November 30, 2010 08:08
Show Gist options
  • Save nnarhinen/721330 to your computer and use it in GitHub Desktop.
Save nnarhinen/721330 to your computer and use it in GitHub Desktop.
var foo = {
someMethod: function() {
var $this = this;
$this.someForm.submit(function() {
$.post($(this).attr('action'), $(this).serialize(), $this._handleSearchResult, 'json');
return false;
});
},
_handleSearchResult: function(data) {
//do something but have to access the widget here. this is just an ajax callback object
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment