javascript - Observing 'click' event on <a> tag generated by scriptaculous Builder -
I am using a screwdriver builder to dynamically generate some DOM elements, and one of these links The tag is. I was not sure how this builds with other builder code with clickback inline, so I'm generating a link tag ahead of time and then to put it in the rest builder step. The problem is that the callback for the link is never actually executed when I click the link, and the URL bar changes in turn, the callback method is a part of my class, Therefore, I am compelling it as an event listener ahead of time. var Foo = Class.create ({initialize: function () {this Closebinding = this.doClose.bindAsEventListener (this);}, generate: function () {/ * create link and Click listener * / var close_link = Builder.node ('a', {href: '#'}, 'off'); event.blog, 'click', this.close binding) / * generate new dom nodes / / Builder Build.node ('div', [Builder.node ('h2', 'this is a test'), close_link])}}, doClose: function (evt) {/ * ...