Skip to content

Instantly share code, notes, and snippets.

@jpoz
Created February 16, 2010 18:49
Show Gist options
  • Select an option

  • Save jpoz/305790 to your computer and use it in GitHub Desktop.

Select an option

Save jpoz/305790 to your computer and use it in GitHub Desktop.
$.engineer.define('basic_button', {
defaults: { title:"Load", url:"/", target:$('') },
structure: function(options) {
return $('<div/>', {
css: {
'background','lightgrey'
},
html: options.title
}
},
behavior: function(options) {
this.click(
options.target.load(options.url)
);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment