[jQuery] noob: input field focus help
I tried the following code, and I don't get the cursor to blink in
input text field. Any idea why is that?
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$('input[@type="text"]')[0].focus();
});
</script>
</head>
<body>
<a href="http://jquery.com/">jQuery</a>
<input type="text" class="text" id="dummy1" name="dummy1" value=""