XFlame,
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Input Test</title>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<script>
$(document).ready(function() {
$('input[type=text]').click(function() {
$(this).addClass('on');
alert(this.className);
});
});
</script>
</head>
<body>
<div id="container">
<form>
<input type="text">
</form>
</div>
</body>
</html>