HenrikJoreteg/Happy.js — pull request #31 by am (2014-04-02 17:15:42+00:00)
Title: Fixes .when attribute

From documentation it seems that `when` is a attribute of ``. This way you can configure a different event for each input:

$('#awesomeForm').isHappy({
fields: {
// reference the field you're talking about, probably by `id`
// but you could certainly do $('[name=name]') as well.
'#yourName': {
required: true,
message: 'Might we inquire your name',
when: 'keyup'
}
},
});

Previously the attribute was set over the `fields` object, if you set this value it will change the event for all fields.