Skip to content

Instantly share code, notes, and snippets.

@bmavity
Created April 1, 2010 21:00
Show Gist options
  • Save bmavity/352356 to your computer and use it in GitHub Desktop.
Save bmavity/352356 to your computer and use it in GitHub Desktop.
ioc('parent', function(component, parentElement){
parentElement.click(function() {
component.parentClicked();
});
});
ioc('component', function(componentElement) {
componentElement.click(function() {
alert('component clicked');
});
this.parentClicked = function() {
alert('parent clicked');
};
});
ioc('parent');
@bmavity
Copy link
Author

bmavity commented Apr 26, 2010

Still tweaking the usage. had some inspiration this weekend ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment