Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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