Skip to content

Instantly share code, notes, and snippets.

@mnelson
Created April 14, 2011 22:19
Show Gist options
  • Save mnelson/920699 to your computer and use it in GitHub Desktop.
Save mnelson/920699 to your computer and use it in GitHub Desktop.
Let's try to be a little friendlier with new dom elements.
observe_anchors : function(){
box = this;
$(document.body).addEvent('click:relay(a[rel*="box"])', function(e){
var a = e.target;
if(a.rel && a.rel.test(box.opt.rel_target)){
box.set_loading();
box.construct_renderable_from_link(a).render();
e.stop();
}
});
},
@mnelson
Copy link
Author

mnelson commented Apr 14, 2011

Just replace the observe_anchors method with the one provided here.

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