Using jQuery i would like to run a function when either .change()
or .keyup()
are raised.
Something like this.
if ( jQuery(':input').change() || jQuery(':input').keyup() )
{
alert( 'something happened!' );
}
EDIT
Sorry i forgot to mention. Both .change()
and .keyup()
need some of the variables to be in-scope.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…