On 10/4/07, crybaby <[EMAIL PROTECTED]> wrote: > > 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(){ > $('[EMAIL PROTECTED]"text"]')[0].focus(); > }); > > </script> > </head> > <body> > <a href="http://jquery.com/">jQuery</a> > <input type="text" class="text" id="dummy1" name="dummy1" value="" > > </p> > </body> > </html> > >
try $("#dummy1").focus(); It's simpler and easier to figure out in three weeks.