Re: [jQuery] input field focus help!

2006-11-17 Thread Brandon Aaron
On 11/17/06, "Jörn Zaefferer" <[EMAIL PROTECTED]> wrote: > > Or you could call focus on each of the elements in the jQuery object like > > this: > > > > jQuery.fn.fieldFocus = function() { > > return this.each(function() { > > if (this.focus) this.focus(); > > }); > > }; > > > > Ins

Re: [jQuery] input field focus help!

2006-11-17 Thread Jörn Zaefferer
> Or you could call focus on each of the elements in the jQuery object like > this: > > jQuery.fn.fieldFocus = function() { > return this.each(function() { > if (this.focus) this.focus(); > }); > }; > > Inside of the each method the 'this' points to the actual DOM element > and no

Re: [jQuery] input field focus help!

2006-11-17 Thread Brandon Aaron
On 11/17/06, Roberto Ortelli <[EMAIL PROTECTED]> wrote: > Hello, > A few weeks ago I've written a small plugin for that: > > $.fn.fieldFocus = function(id){ > document.getElementById(id).focus(); > } > > and you call it using: > $(document).fieldFocus("the_id_of_the_input_field_without_#");

Re: [jQuery] input field focus help!

2006-11-17 Thread Klaus Hartl
董軒綜 schrieb: > Maybe can four words less > > $('#the_id_of_the_input')[0].focus(); Hehe, yes :-) I tend to use get() for readability... -- Klaus ___ jQuery mailing list discuss@jquery.com http://jquery.com/discuss/

Re: [jQuery] input field focus help!

2006-11-17 Thread Roberto Ortelli
Yeah, thanks Klaus ;) 2006/11/17, Klaus Hartl <[EMAIL PROTECTED]>: > Roberto Ortelli schrieb: > > Hello, > > A few weeks ago I've written a small plugin for that: > > > > $.fn.fieldFocus = function(id){ > > document.getElementById(id).focus(); > > } > > > > and you call it using: > > $(docum

Re: [jQuery] input field focus help!

2006-11-17 Thread 董軒綜
Maybe can four words   less $('#the_id_of_the_input')[0].focus(); Klaus Hartl 写道: Roberto Ortelli schrieb: Hello, A few weeks ago I've written a small plugin for that: $.fn.fieldFocus = function(id){ document.getElementById(id).focus(); } and you call it using: $(document).fi

Re: [jQuery] input field focus help!

2006-11-17 Thread Klaus Hartl
Roberto Ortelli schrieb: > Hello, > A few weeks ago I've written a small plugin for that: > > $.fn.fieldFocus = function(id){ > document.getElementById(id).focus(); > } > > and you call it using: > $(document).fieldFocus("the_id_of_the_input_field_without_#"); That is exactly the same as i

Re: [jQuery] input field focus help!

2006-11-16 Thread Roberto Ortelli
ust do plain CSS, > it now works! > > Thanks again for the help... > > cheers, > cdelfino > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Behalf Of Erik Beeson > Sent: Friday, November 17, 2006 10:36 AM > To: jQuery Discussion.

Re: [jQuery] input field focus help!

2006-11-16 Thread Clodelio Delfino
s! Thanks again for the help... cheers, cdelfino -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Erik Beeson Sent: Friday, November 17, 2006 10:36 AM To: jQuery Discussion. Subject: Re: [jQuery] input field focus help! Ahh, right, that is th

Re: [jQuery] input field focus help!

2006-11-16 Thread Erik Beeson
ssion. *Subject:* Re: [jQuery] input field focus help! .focus() does NOT set the focus of an element, it fires all of the registered onfocus events. Use $("").get(0).focus(). --Erik On 11/16/06, Clodelio Delfino <[EMAIL PROTECTED]> wrote: > > i've downloaded thickbo

Re: [jQuery] input field focus help!

2006-11-16 Thread Clodelio Delfino
() $("#frmLogin input")[0].focus() Above doesn't work...either c",) cdelfino -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Glen Lipka Sent: Friday, November 17, 2006 8:04 AM To: jQuery Discussion. Subject: Re: [jQuery] input field

Re: [jQuery] input field focus help!

2006-11-16 Thread Glen Lipka
Friday, November 17, 2006 7:34 AM *To:* jQuery Discussion. *Subject:* Re: [jQuery] input field focus help! .focus() does NOT set the focus of an element, it fires all of the registered onfocus events. Use $("").get(0).focus(). --Erik On 11/16/06, Clodelio Delfino <[EMAIL PROTECTE

Re: [jQuery] input field focus help!

2006-11-16 Thread Clodelio Delfino
Thanks Erik for the input but it doesn't work... c",) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Erik Beeson Sent: Friday, November 17, 2006 7:34 AM To: jQuery Discussion. Subject: Re: [jQuery] input field focus help! .focus() do

Re: [jQuery] input field focus help!

2006-11-16 Thread Erik Beeson
.focus() does NOT set the focus of an element, it fires all of the registered onfocus events. Use $("").get(0).focus(). --Erik On 11/16/06, Clodelio Delfino <[EMAIL PROTECTED]> wrote: i've downloaded thickbox and tried the login demo, the dialog box work as expected however but when i tried to

[jQuery] input field focus help!

2006-11-16 Thread Clodelio Delfino
i've downloaded thickbox and tried the login demo, the dialog box work as expected however but when i tried to set an autofocus on the username field, it doesn't work. below is a snippet of the code: default.php has the clickable: Click Login login.php is the form with code below: http://www.