You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
628 B

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);
}
});
}
});