Created
April 14, 2011 22:19
-
-
Save mnelson/920699 to your computer and use it in GitHub Desktop.
Let's try to be a little friendlier with new dom elements.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | |
} | |
}); | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just replace the observe_anchors method with the one provided here.