event:Selectors for Prototype
According to this post on the mir.aculou.us website, Justin Palmer has released event:Selectors, a “method to cleanly use CSS pseudo selectors to assign DOM events to elements on the page.”
The functionality, bearing resemblance to the behaviour.js library, hooks into all of the latest Prototype functionality and adds a few tricks of its own. They provide a code example of how this new functionality can be used:
var Rules = { ‘#icons a:mouseover’: function(element) { var app = element.id; new Effect.BlindDown(app + ‘-content’, {queue: ‘end’, duration: 0.2}); },‘#icons a:mouseout’: function(element) { var app = element.id; new Effect.BlindUp(app + ‘-content’, {queue: ‘end’, duration: 0.2}); } }
Leave a Reply
You must be logged in to post a comment.