Skip to content

Instantly share code, notes, and snippets.

@jlong
Created April 2, 2009 17:21
Show Gist options
  • Save jlong/89299 to your computer and use it in GitHub Desktop.
Save jlong/89299 to your computer and use it in GitHub Desktop.
FancyZoomImageBehavior = Behavior.create({
initialize: function() {
var src = this.element.readAttribute('href');
var div = $div($img({src: src}));
document.body.insert({after: div});
this.element.writeAttribute('href', '#' + div.identify());
new FancyZoom(this.element);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment