Dear Sir,

When control enter in any textbox then following codes must run.

Please help me what is wrong with my codes


<html>
<head><title>My Contacts</title>

<style type="text/css">
body{
margin-top:100px;
margin-left:100px;
}
</style>

<script type="text/javascript">

$(document).ready(function(){
$('input[type="text"]').focus(function(){
$('input[type="text"]').css({
"background-color":"silver",
"font-size":"12px",
"color":"green"
});
});
});

</script>


</head>

<body>
<form>
<input type="text" name="text1"><br />
<input type="text" name="text2"><br />
<input type="text" name="text3"><br />
<input type="text" name="text4"><br />
</form>

</body>
</html>