I have a such fuctions for Jquery:
$("input").focus(function () {
$(this).addClass('focus');
});
$("input").blur(function () {
$(this).removeClass('focus');
});
$("select").focus(function () {
$(this).addClass('focus');
});
$("select").blur(function () {
$(this).removeClass('focus');
});
$("textarea").focus(function () {
$(this).addClass('focus');
});
$("textarea").blur(function () {
$(this).removeClass('focus');
});
Is it possible to optimize, for a less code?