[JS/CSS] event:Selectors - the simplest way to hook Javascript events to a CSS class
event:Selectors
is a really nice wrapper for the
Prototype.js library. It allows you to hook Javascript events to CSS classes
with 2 or 3 lines of Javascript code:
'#icons a:mouseout, #other-item:mouseover': function(element) {
var app = element.id;
new Effect.BlindUp(app + '-content', {queue: 'end', duration: 0.2});
}
Prototype recently added Attribute
Selectors , which allows this kind of fun:
input[type="submit"] { color:
#ccc; }
a[href!="#"] { background:
#c00; }
a[class~=external][href="#"] { font-style: italic; }