Files
Ruud 288aa8c0a1 Movie search
Profile Settings
2011-03-20 22:12:33 +01:00

28 lines
628 B
JavaScript

var Uniform = new Class({
Implements : [Options],
options : {
focusedClass : 'focused',
holderClass : 'ctrlHolder'
},
initialize : function(options) {
this.setOptions(options);
var focused = this.options.focusedClass;
var holder = '.' + this.options.holderClass;
$(document.body).addEvents( {
'focus:relay(input, select, textarea)' : function() {
var parent = this.getParent(holder);
if (parent)
parent.addClass(focused);
},
'blur:relay(input, select, textarea)' : function() {
var parent = this.getParent(holder);
if (parent)
parent.removeClass(focused);
}
});
}
});