Skip to content

Instantly share code, notes, and snippets.

@iamnoah
Created July 24, 2010 23:08
Show Gist options
  • Select an option

  • Save iamnoah/489068 to your computer and use it in GitHub Desktop.

Select an option

Save iamnoah/489068 to your computer and use it in GitHub Desktop.
var grailsAjax = {
refresh: function(target,params,cb) {
var component = $(target).parents('.ajax-component:first');
if(!component.length) throw "Error: target does not belong to an ajax component"
var path = '../'+component.attr('id').replace(/-/g,'/');
component.load(path,params,cb);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment